[Matplotlib-users] text in axis coords
Hi all, I need to set texts on figures in axis coords, not data coords. Following text doc, transform=ax.transAxes seems not working : ## |~|[32]ax=subplot(111) |~|[33]text( 0.0, 1.0, 'text1', transform=ax.transData, color='r' ) Out [33]:matplotlib.text.Text instance at 0xb487fbec |~|[34]text( 1.0, 1.0, 'text2', transform=ax.transAxes, color='b' ) Out [34]:matplotlib.text.Text instance at 0xb488298c ## gives figure in the attached picture. Text2 must be out of figure, not here! An idea? thanks -- Lionel Roubeyrie - [EMAIL PROTECTED] LIMAIR http://www.limair.asso.fr text.png Description: PNG image - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] text in axis coords
Arg, sorry, stupid question, I didn't use valid limits. Le Mardi 09 Janvier 2007 12:32, Lionel Roubeyrie a écrit : Hi all, I need to set texts on figures in axis coords, not data coords. Following text doc, transform=ax.transAxes seems not working : ## |~|[32]ax=subplot(111) | |~|[33]text( 0.0, 1.0, 'text1', transform=ax.transData, color='r' ) Out [33]:matplotlib.text.Text instance at 0xb487fbec |~|[34]text( 1.0, 1.0, 'text2', transform=ax.transAxes, color='b' ) Out [34]:matplotlib.text.Text instance at 0xb488298c ## gives figure in the attached picture. Text2 must be out of figure, not here! An idea? thanks -- Lionel Roubeyrie - [EMAIL PROTECTED] LIMAIR http://www.limair.asso.fr - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] mathtext fonts
Is there a way to get latex to use Ariel font and not italic? If I use the \rm{} command I can get rid of italic, but it is using a serif font and I cannot find any documentation on how to change that font. Thanks, Lane Brooks - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] mathtext fonts
On Tuesday 09 January 2007 12:56, Lane Brooks wrote: Is there a way to get latex to use Ariel font and not italic? If I use the \rm{} command I can get rid of italic, but it is using a serif font and I cannot find any documentation on how to change that font. Arial fonts are not supported by latex. Beyond that, I can't be of much help without a brief example. Darren - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] mathtext fonts
On Tuesday 09 January 2007 12:56, Lane Brooks wrote: Is there a way to get latex to use Ariel font and not italic? If I use the \rm{} command I can get rid of italic, but it is using a serif font and I cannot find any documentation on how to change that font. You can't (easily )get Ariel, but you can get a SanSerif font. \rm{} means Roman Font you want: \sf{} (Sans Serif Font) -Chris NOTE: I've never used this with MPL, but that's the LaTeX way. -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] mathtext fonts
On Tuesday 09 January 2007 13:54, Christopher Barker wrote: On Tuesday 09 January 2007 12:56, Lane Brooks wrote: Is there a way to get latex to use Ariel font and not italic? If I use the \rm{} command I can get rid of italic, but it is using a serif font and I cannot find any documentation on how to change that font. You can't (easily )get Ariel, but you can get a SanSerif font. \rm{} means Roman Font you want: \sf{} (Sans Serif Font) -Chris NOTE: I've never used this with MPL, but that's the LaTeX way. Not to be picky, but those are technically TeX commands. usetex uses LaTeX, which will accept these TeX font commands, but in a few cases they give results that are not ideal. Better to use the LaTeX versions: \textrm, \textsf, etc. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Matplotlib temporary files
Hi have a Python application using matplotlib installed on a windows machine using PY2EXE. Am having some problems because the application appears to be writing some temporary files to C:\ but users do not have permission to write to this directory. It looks like matplotlib is writing the temporary files - can I supress these files? If not, how do I tell matplotlib to write somewhere else (eg C:\windows\temp)? Thanks in advance Alun Griffiths - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] axis not accepting keyword arguments any longer?
Hi, I am running some code which used to work a couple of months ago, but now fails on the axis command which does not seem to accept keyword arguments any longer (current version 0.87.7 from Fedora Extras, previous version probably 0.87.4 or so). Traceback is below... Any ideas? Thanks, Marcel /home/marcel/src/python/advection/paper1/colonius.py in colonius(Q, full) 93 figure () 94 xlabel (r'$\xi$') --- 95 axis (xmin=0, xmax=pi) 96 plot (xxiplot, omega(xxiplot), k-, 97 xxiplot, dwdxi (xxiplot), k--, /usr/lib/python2.4/site-packages/matplotlib/pylab.py in axis(*v, **kwargs) 622 623 ax = gca() -- 624 v = ax.axis(*v, **kwargs) 625 draw_if_interactive() 626 return v /usr/lib/python2.4/site-packages/matplotlib/axes.py in axis(self, *v, **kwargs) 775 except IndexError: 776 xmin, xmax = self.set_xlim(**kwargs) -- 777 ymin, ymax = self.set_ylim(**kwargs) 778 return xmin, xmax, ymin, ymax 779 TypeError: set_ylim() got an unexpected keyword argument 'xmin' WARNING: Failure executing file: colonius.py - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] axis not accepting keyword arguments any longer?
It is a bug. I don't know how or when it was introduced. I can fix it in svn later today. Eric Marcel Oliver wrote: Hi, I am running some code which used to work a couple of months ago, but now fails on the axis command which does not seem to accept keyword arguments any longer (current version 0.87.7 from Fedora Extras, previous version probably 0.87.4 or so). Traceback is below... Any ideas? Thanks, Marcel /home/marcel/src/python/advection/paper1/colonius.py in colonius(Q, full) 93 figure () 94 xlabel (r'$\xi$') --- 95 axis (xmin=0, xmax=pi) 96 plot (xxiplot, omega(xxiplot), k-, 97 xxiplot, dwdxi (xxiplot), k--, /usr/lib/python2.4/site-packages/matplotlib/pylab.py in axis(*v, **kwargs) 622 623 ax = gca() -- 624 v = ax.axis(*v, **kwargs) 625 draw_if_interactive() 626 return v /usr/lib/python2.4/site-packages/matplotlib/axes.py in axis(self, *v, **kwargs) 775 except IndexError: 776 xmin, xmax = self.set_xlim(**kwargs) -- 777 ymin, ymax = self.set_ylim(**kwargs) 778 return xmin, xmax, ymin, ymax 779 TypeError: set_ylim() got an unexpected keyword argument 'xmin' WARNING: Failure executing file: colonius.py - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] axis not accepting keyword arguments any longer?
Marcel == Marcel Oliver [EMAIL PROTECTED] writes: Marcel TypeError: set_ylim() got an unexpected keyword argument Marcel 'xmin' WARNING: Failure executing file: colonius.py This is a bug -- thanks for reporting it. I just committed changes to svn to fix it. JDH - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] clearing a figure
Hello, I'm a new matplotlib user, coming from the Matlab end. Is there a standard way to create a figure (here I'd like the equivalent of matlab's hold on, so I can draw multiple things) and then clear the figure (so the drawing goes away) so I can repeat the process again? The commands to plot that I'll be using are fairly simple line commands. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] clearing a figure
One of the reasons I'm confused is b/c when I poked around, I found a clear method: help(pylab.gcf().clear) Help on method clear in module matplotlib.figure: clear(self) method of matplotlib.figure.Figure instance Clear the figure but when I execute this on my open figure: pylab.gcf().clear() nothing happens; the figure's still displaying whatever was already on it. So far, the only thing I've found that works is to call plot differently when its time to clear the figure (pass hold=False). Subsequent calls to plot (w/o this option) keep adding to, which is great. Is passing a hold=False arg to a drawing command the preferred way to clear a figure, or is clear() not working properly? Many thanks, --b On Jan 9, 2007, at 7:50 PM, belinda thom wrote: Hello, I'm a new matplotlib user, coming from the Matlab end. Is there a standard way to create a figure (here I'd like the equivalent of matlab's hold on, so I can draw multiple things) and then clear the figure (so the drawing goes away) so I can repeat the process again? The commands to plot that I'll be using are fairly simple line commands. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] idle and ipython and axis
Hi, I've been playing w/both IDLE and IPython, using TkAgg in both cases as the back end. Also, I've got the latest matplotlib and ipython versions and am using MacPython's 2.4.4 IDLE. It seems that if IDLE is not invoked w/the -n flag, the figures that are drawn can often get the whirling swirl of death (i.e. they hang). Has it been other users' experience that the -n removes that problem (it mentioned this flag in the manual, but I didn't catch he motivation)? And if so, is there no other way to use IDLE when using matplotlib interactively? (The nice thing about IDLE is its fresh state each time you run a file; this goes away when -n is used). I'm pleased to report no whirling wheels when using matplotlib via IPython. By being able to compare behavior on both I might have found a bug: I can create plots to my hearts content in both, but when I ask to rescale the plots, e.g. axis([-.2,2.4,-2,2.4]), NOTHING happens to the figure drawn via IDLE, whereas the command works as expected in IPython. I hope posting this is useful. Feedback welcome. --b - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] clearing a figure
belinda thom wrote: One of the reasons I'm confused is b/c when I poked around, I found a clear method: help(pylab.gcf().clear) Help on method clear in module matplotlib.figure: clear(self) method of matplotlib.figure.Figure instance Clear the figure but when I execute this on my open figure: pylab.gcf().clear() nothing happens; the figure's still displaying whatever was already on it. The reason is that in interactive mode (as with ipython -pylab) the figure is not redrawn after you execute this method. What you want instead is pylab.clf() which will call the clear and then call draw_if_interactive(). This is the big difference between most pylab functions and the corresponding axes or figure methods that they wrap: the pylab functions automatically take care of redrawing the figure if you are in an interactive mode. So far, the only thing I've found that works is to call plot differently when its time to clear the figure (pass hold=False). Subsequent calls to plot (w/o this option) keep adding to, which is great. pylab also has a hold() function similar to the Matlab command, as an alternative to passing the hold state in the plotting command call: def hold(b=None): Set the hold state. If hold is None (default), toggle the hold state. Else set the hold state to boolean value b. Eg hold() # toggle hold hold(True) # hold is on hold(False) # hold is off When hold is True, subsequent plot commands will be added to the current axes. When hold is False, the current axes and figure will be cleared on the next plot command Eric Is passing a hold=False arg to a drawing command the preferred way to clear a figure, or is clear() not working properly? Many thanks, --b On Jan 9, 2007, at 7:50 PM, belinda thom wrote: Hello, I'm a new matplotlib user, coming from the Matlab end. Is there a standard way to create a figure (here I'd like the equivalent of matlab's hold on, so I can draw multiple things) and then clear the figure (so the drawing goes away) so I can repeat the process again? The commands to plot that I'll be using are fairly simple line commands. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users