[Paraview] tikz/tex export for paraview contour plots

Armin Wehrfritz dkxls23 at gmail.com
Mon Jun 13 11:56:54 EDT 2016


Hi Richard,


> We created a small python tool, that essentially embeds the figure
> created in paraview into a tikz picture and adds axes. However, we
> still need to manually specify the the extent of the plot in that
> script which is tedious.
This is slightly off-topic, but I have been using a similar approach
(tikz/tex + png images) to include plots from python/matplotlib in my
LaTeX documents. For this I can just recommend the matplotlib2tikz
package [1].

Using VTK/ParaView, I have had some attempts to set the render window
size and camera in python scripts, but could not yet figure out how
to extract the information on the data/viewport extend.


> a) Did anyone encounter the same issue and is willing to share a
> script or so?
My VTK and ParaView scripts are based on information I gathered from two
mailing list discussions, see [2,3]. My scripts are probably not much of
help, but I can dig them out if you are interested.


> b) If not, is there a way to extract the Viewport extent in a python
>  script so that we can directly set them in the script?
That's the missing piece in the puzzle I couldn't quite figure out yet,
but I would also be interested in this. The code in discussion [2] has
some examples on coordinate transforms in VTK, but I didn't have the
time to look deeper into this.


Cheers,
Armin


[1] https://github.com/nschloe/matplotlib2tikz
[2] http://www.vtk.org/pipermail/vtk-developers/2005-November/019314.html
[3]
http://paraview.paraview.narkive.com/8hsmkC4u/python-paraview-simple-zoom-to-data



More information about the ParaView mailing list