[Matplotlib-users] Matplotlib in Latex documents

2012-04-25 Thread Peter Würtz
Hi, I'm having trouble when creating plots for use in latex documents. I tried several methods, but the fonts are always inconsistent in size and weight. I thought the "text.usetex" option to provide a result closest to the latex document I want to include the plots in, but this minimal example s

Re: [Matplotlib-users] Matplotlib in Latex documents

2012-04-25 Thread Peter Würtz
On 04/25/2012 04:06 PM, Alejandro Weinstein wrote: > I use the following setup (under Ubuntu, in case that matters): > > params = {'backend': 'Agg', >'ps.usedistiller' : 'xpdf', >'text.usetex' : True, >'font.family': 'serif', >'font.serif' : ['Times']

[Matplotlib-users] Duplicate Ticks

2012-06-13 Thread Peter Würtz
Hello, I'm searching for a way to extract all text elements from a matplotlib figure including their positions, styles, alignments etc. I first tried to write a custom backend and to fetch all the texts from the "draw_text()" method of the renderer. In contrast to the documentation "draw_text()"

Re: [Matplotlib-users] Duplicate Ticks

2012-06-13 Thread Peter Würtz
I'm sorry, there seems to be a mess. Nabble told me that this mail to the list was not accepted for unknown reasons so I deleted it. Here is the example I was talking about in the previous mail: import matplotlib import pylab as p p.plot([1,2,3]) p.xticks([1],["tick"]) ax = p.gca() fig = p.gcf()

[Matplotlib-users] Duplicate Ticks

2012-06-14 Thread Peter Würtz
Hello, I'm searching for a way to extract all text elements from a matplotlib figure including their positions, styles, alignments etc. I first tried to write a custom backend and to fetch all the texts from the "draw_text()" method of the renderer. In contrast to the documentation "draw_text()" d

Re: [Matplotlib-users] Duplicate Ticks

2012-06-14 Thread Peter Würtz
Benjamin Root-2 wrote: > > On Wed, Jun 13, 2012 at 10:46 AM, Peter Würtz > wrote: > >> import matplotlib >> import pylab as p >> >> p.plot([1,2,3]) >> p.xticks([1],["tick"]) >> ax = p.gca() >> fig = p.gcf() >>

[Matplotlib-users] Pgf Backend with Xelatex support

2012-06-26 Thread Peter Würtz
Hi, When creating figures to be included in Latex documents I encountered a few problems. In the end the text rendering just doesn't blend in well, one way or another. I found that the problems can be fixed by using Xelatex, which provides full unicode support and is able to use the installed fon

Re: [Matplotlib-users] Pgf Backend with Xelatex support

2012-06-26 Thread Peter Würtz
efiring wrote: > > Not so--the non-interactive backends like svg and pdf do not do anything > upon show(), so it sounds like nothing needs to be added to your pgf > backend on this score. > Hmm right, when explicitly changing to non gui backends like "ps" or "pdf" the show command is ignored

Re: [Matplotlib-users] Pgf Backend with Xelatex support

2012-06-27 Thread Peter Würtz
Andreas Hilboll wrote: > >> I wrote a new backend that uses the "pgf" latex package for drawing >> matplotlib figures. It is compatible with pdflatex, xelatex and lualatex. >> The pgf pictures can be included in latex documents or can be directly >> compiled to PDF by the backend, utilizing the

[Matplotlib-users] Latex, Labels and PDF

2007-07-24 Thread Peter Würtz
Hi, I ran into some troubles when trying to do the following with matplotlib: - plotting a figure - using latex for axis labels - (getting acceptable fonts) - getting a pdf in the end I've not been able to solve this. In the documentation I found 2 ways to do this.

Re: [Matplotlib-users] Latex, Labels and PDF

2007-07-24 Thread Peter Würtz
Hi, > Try getting your system set up to use the xpdf distiller, that has always > given me excellent results. Thanks alot! Using xpdf gives perfect results! http://www.staff.uni-mainz.de/wuertz/matplotlib/xpdf_tof_spectrum_bec_500ns.eps http://www.staff.uni-mainz.de/wuertz/matplotlib/xpdf_tof_sp

[Matplotlib-users] plot autorange

2007-08-16 Thread Peter Würtz
Hi, Sorry this might look like a really stupid question, but I have not been able to find an answer in the matplotlib documentation... When plotting data points using the "o"-style, some points are truncated by the axis borders. Is there a way to define some kind of margin without changing the x/