Comments (1)
Hi
First, note that you can use LaTeX for text rendering in matplotlib. You can even add a preamble:
rc('text', usetex=True)
matplotlib.rcParams['text.latex.preamble'] = ['\usepackage{siunitx}']
I suppose you can put all your document-specific settings in a package and rely on \usepackage{your_settings} to use them.
Something closer to your example is to use the pgf backend, which generates pgf commands that can be executed by latex.
See: http://matplotlib.org/users/pgf.html
''Using the pgf backend, matplotlib can export figures as pgf drawing commands that can be processed with pdflatex, xelatex or lualatex. XeLaTeX and LuaLaTeX have full unicode support and can use any font that is installed in the operating system, making use of advanced typographic features of OpenType, AAT and Graphite. Pgf pictures created by plt.savefig('figure.pgf') can be embedded as raw commands in LaTeX documents"
It also seems (I never tried) that you can embed python code into latex:
http://tex.stackexchange.com/questions/121877/embedding-python-in-latex-hello-example
Putting everything together: I believe it's possible to do something similar to what you do with gnuplot, but I never tried. If you manage to do it, don't hesitate to do a pull request and I will include your contribution in the tutorial.
from matplotlib_for_papers.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matplotlib_for_papers.