- Export the plot as SVG
plt.savefig("plot.svg")
- Open
plot.svg
with an editor and include in the definitions the following:
<defs>
<filter id="shadow">
<feOffset dx="0" dy="0"/>
git rm --cached -r .idea |
import re | |
def stroke_same_as_fill(file_name, output_file_name): | |
""" | |
Creates a new QML file (QGIS style format) with the colors of the strokes equals to the shape fills. | |
stroke_same_as_fill("/home/marcos/Downloads/teste.qml", "/home/marcos/Downloads/teste2.qml") | |
:param file_name: filename of QML input file | |
:param output_file_name: output | |
""" | |
with open(file_name, 'r') as input_file, open(output_file_name, 'w') as output_file: | |
lines = input_file.readlines() |
git config --global url."https://yourusername@github.com".insteadOf "https://github.com" | |
git config --global credential.helper 'cache --timeout=28800' | |
git config remote.origin.url https://{USERNAME}:{PASSWORD}@github.com/{USERNAME}/{REPONAME}.git | |
git config -l | |
git config --global user.name "YOUR NAME" | |
git config --global user.email "YOUR EMAIL ADDRESS" |
\usepackage{hyperref} | |
\hypersetup{allcolors=black,colorlinks=true} |
print name.encode('ascii', 'ignore') | |
print name.encode('utf-8', 'ignore') |
from osgeo import ogr, osr | |
driver = ogr.GetDriverByName('ESRI Shapefile') | |
dataset = driver.Open(r'tabblock2010_25_pophu.shp') | |
# from Layer | |
layer = dataset.GetLayer() | |
spatialRef = layer.GetSpatialRef() | |
print spatialRef | |
# from Geometry | |
feature = layer.GetNextFeature() | |
geom = feature.GetGeometryRef() |
@BOOK{quetelet1833recherches, | |
address = {Brussels, Belgium}, | |
author = {Quetelet, A}, | |
pages = {87}, | |
publisher = {M. Hayez}, | |
title = {{Recherches sur le penchant au crime aux diff{\'{e}}rens {\^{a}}ges}}, | |
url = {https://books.google.com/books?id=ZNEiAAAAMAAJ}, | |
year = {1833} | |
} |
%http://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-a4.pdf | |
\usepackage{latexsym} % needs this to have on latex2e | |
$\bullet$ |
Colors from From: Wong, Bang. "Points of view: Color blindness." Nature methods 8.6 (2011): 441-441.
in RGB:
color_names = ["Black", "Orange", "Sky blue", "Bluish green", "Yellow", "Blue", "Vermillion", "Reddish purple"]
colors_colorblind_safe = [(0, 0, 0), (230, 159, 0), (86, 180, 233), (0, 158, 115), (240, 228, 66), (0, 114, 178), (213, 94, 0), (204, 121, 167)]
colors_colorblind_safe = ['#%02x%02x%02x' % (c[0], c[1], c[2]) for c in colors_colorblind_safe]
colors = dict(zip(color_names, colors_colorblind_safe))
three_colors = colors['Blue'], colors['Vermillion'], colors['Bluish green']