Last active
September 14, 2018 17:57
-
-
Save jcheong0428/13a4ec46459a380cd9f7d80ec45acdd6 to your computer and use it in GitHub Desktop.
Creating illustrator ready matplotlib plots
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This sets the pdf font type so that it imports correctly in Adobe Illustrator. | |
# Source: http://jonathansoma.com/lede/data-studio/matplotlib/exporting-from-matplotlib-to-open-in-adobe-illustrator/ | |
import matplotlib | |
matplotlib.rcParams['pdf.fonttype'] = 42 | |
matplotlib.rcParams['ps.fonttype'] = 42 | |
# Generating 2x retina plots | |
%config InlineBackend.figure_format = 'retina' | |
# Set base figure size | |
matplotlib.rc("figure", figsize=(5, 5)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment