Hi,
We are currently trying to export paraview contour plots and include
them into a latex document. The straight forward way of exporting an eps
or similar image has some issues. In particular the axis are not scaling
with the camera view, hence, if you zoom in, you don't get them on the
plot since they are only at the exterior of the data. 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.
a) Did anyone encounter the same issue and is willing to share a script
or so?
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?
c) In addition it would be great if also the text in the legend would be
rendered in latex. Therefore it would be great if we could place it in
the Paraview window and then only plot the colorbar and add the text to
the tikz file.
Thanks,
Richard
PS: the core of the python script that prepares the tikz file:
ifile=open(outfilename,'w')
formstring=' {:>10.8f}'
line='% this picture was created with the axisNlable_generator.py script
\n'\
+ '% \n \n'
ifile.write(line)
line='\\begin{tikzpicture} \n' \
+ '\\begin{axis}[ \n' \
+ 'axis on top,enlargelimits=false,\n'\
+ 'width=\\figurewidth, \n' \
+ 'axis equal image,\n'\
+ 'xlabel='+xlabel+',\n'\
+ 'ylabel='+ylabel+']\n'\
+ '\\addplot[]
graphics[xmin='+str(xmin)+',ymin='+str(ymin)+',xmax='+str(xmax)+',ymax='+str(ymax)+']\n'
\
+ '{'+enbed_fname+'};\n'\
+ '\\end{axis} \n' \
+ '\\end{tikzpicture} \n' \
ifile.write(line)
ifile.close()
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the ParaView Wiki at:
http://paraview.org/Wiki/ParaView
Search the list archives at: http://markmail.org/search/?q=ParaView
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview