You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
1
(17) |
2
(3) |
3
(2) |
4
(11) |
5
(8) |
6
(22) |
7
(16) |
8
(9) |
9
(14) |
10
(1) |
11
(8) |
12
(5) |
13
(7) |
14
(10) |
15
(28) |
16
(8) |
17
(20) |
18
(6) |
19
(5) |
20
(15) |
21
(8) |
22
(7) |
23
(14) |
24
(10) |
25
(6) |
26
(8) |
27
(9) |
28
(11) |
29
(13) |
30
(20) |
|
Is this a bug in the PDF/SVG backends or am I doing something wrong? If the former is there any workaround? The simple testcase below demonstrates the problem whereby the watermark doesn't show up in the pdf output but does in the png output. import Image from scipy import lena from scipy.ndimage import map_coordinates from cStringIO import StringIO def add_watermark(fig, watermark): import matplotlib.image as image im = image.imread(watermark) dpi = fig.get_dpi() offset = dpi*fig.get_size_inches()[0] - im.shape[1] fig.figimage(im, offset, 0, alpha=0.3) return fig # im = Image.fromarray(map_coordinates(lena(), mgrid[0:512:100j, 0:512:100j])) watermark = StringIO() im.save(watermark, format='png') watermark.seek(0) fig = figure(figsize=(12, 8)) plot(randn(1000)) add_watermark(fig, watermark) fig.savefig('test.png', dpi=fig.get_dpi()) fig.savefig('test.pdf', dpi=fig.get_dpi()) Thanks, Dave
"Sarlo, Jeffrey S" <JS...@Ce...> writes: > libpng: 1.5.4 Your options are to use libpng 1.2.46, use a recent git version of matplotlib, or cherry-pick commit 45c4667 on top of your older version to get support for libpng 1.5. There is a new release planned soon, and it will include this fix. -- Jouni K. Seppänen http://www.iki.fi/jks
Hi, I have two questions about using NavigationToolbar2Wx with mplot3d. 1/ Initially the 3D scatter plot will rotate as usual with a mouse, but after selecting the 'pan' or 'zoom' buttons the plot responds with some confusion. How can I restore it to rotation only, i.e. disconnect the zoom or pan behaviour? 2/ When using the 'save' button I get different behaviours depending on the backend. With 'WXAgg' the saved png image shows only the axes, not the scatter points. The scatter points and axes do appear correctly in a pdf file. Using the 'WX' backend gives both scatter points and axes for the png file. My full application has a mix of 2D and 3D plots (separate notebooks) and it would be preferable for users if all plots could usedthe common toolbar. I see this behaviour running matplotlib 1.0.1 with Python 2.6.6 and wxPython 2.8.11.0 under Windows XP with the example below. #----------------------------------------------------------------------------------- # adapted from example code "embedding_in_wx2.py" import numpy as np import matplotlib # uncomment the following to use wx rather than wxagg #matplotlib.use('WX') #from matplotlib.backends.backend_wx import FigureCanvasWx as FigureCanvas # comment out the following to use wx rather than wxagg matplotlib.use('WXAgg') from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas from matplotlib.backends.backend_wx import NavigationToolbar2Wx from matplotlib.figure import Figure from mpl_toolkits.mplot3d import Axes3D import wx class CanvasFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self,None,-1, 'CanvasFrame',size=(550,350)) self.SetBackgroundColour(wx.NamedColor("WHITE")) self.figure = Figure() self.canvas = FigureCanvas(self, -1, self.figure) self.axes = Axes3D(self.figure) xs = np.random.rand(100) ys = np.random.rand(100) zs = np.random.rand(100) self.axes.scatter(xs, ys, zs) self.sizer = wx.BoxSizer(wx.VERTICAL) self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW) self.SetSizer(self.sizer) self.Fit() self.add_toolbar() # comment this out for no toolbar def add_toolbar(self): self.toolbar = NavigationToolbar2Wx(self.canvas) self.toolbar.Realize() if wx.Platform == '__WXMAC__': # Mac platform (OSX 10.3, MacPython) does not seem to cope with # having a toolbar in a sizer. This work-around gets the buttons # back, but at the expense of having the toolbar at the top self.SetToolBar(self.toolbar) else: # On Windows platform, default window size is incorrect, so set # toolbar width to figure width. tw, th = self.toolbar.GetSizeTuple() fw, fh = self.canvas.GetSizeTuple() # By adding toolbar in sizer, we are able to put it at the bottom # of the frame - so appearance is closer to GTK version. # As noted above, doesn't work for Mac. self.toolbar.SetSize(wx.Size(fw, th)) self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND) # update the axes menu on the toolbar self.toolbar.update() def OnPaint(self, event): self.canvas.draw() class App(wx.App): def OnInit(self): 'Create the main window and insert the custom frame' frame = CanvasFrame() frame.Show(True) return True app = App(0) app.MainLoop() #------------------------------------------------------------------------------------------------ Regards, Keith ________________________________ This electronic transmission and any documents accompanying this electronic transmission contain confidential information belonging to the sender. This information may be legally privileged. The information is intended only for the use of the individual or entity named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on or regarding the contents of this electronically transmitted information is strictly prohibited.
I am having problems compiling matplotlib on RHEL5. I changed the setup.cfg to use a different base directory, but other than that no files changed/customized. Thanks. Jeff $ python setup.py build basedirlist is: ['/share/apps/gpaw-0.8.0-py2.6'] ============================================================================ BUILDING MATPLOTLIB matplotlib: 1.0.1 python: 2.6.7 (r267:88850, Sep 20 2011, 13:39:45) [GCC 4.1.2 20080704 (Red Hat 4.1.2-51)] platform: linux2 REQUIRED DEPENDENCIES numpy: 1.5.1 freetype2: 13.0.7 OPTIONAL BACKEND DEPENDENCIES libpng: 1.5.4 Tkinter: Tkinter: 73770, Tk: 8.4, Tcl: 8.4 wxPython: no * wxPython not found Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to "import gtk" in your build/install environment Mac OS X native: no Qt: no Qt4: no Cairo: 1.8.10 OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: matplotlib will provide pytz: matplotlib will provide adding pytz OPTIONAL USETEX DEPENDENCIES dvipng: 1.5 ghostscript: 8.70 latex: 3.141592 pdftops: 3.00 [Edit setup.cfg to suppress the above messages] ============================================================================ pymods ['pylab'] packages ['matplotlib', 'matplotlib.backends', 'matplotlib.backends.qt4_editor', 'matplotlib.projections', 'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.tri', 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil/zoneinfo'] running build running build_py copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.linux-x86_64-2.6/matplotlib/mpl-data copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.linux-x86_64-2.6/matplotlib/mpl-data running build_ext building 'matplotlib._png' extension gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/share/apps/gpaw-0.8.0-py2.6/include -I/share/apps/gpaw-0.8.0-py2.6/include/glib-2.0 -I/share/apps/gpaw-0.8.0-py2.6/include/glib-2.0/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/share/apps/gpaw-0.8.0-py2.6/include/libpng15 -I/share/apps/gpaw-0.8.0-py2.6/include -I. -I/share/apps/gpaw-0.8.0-py2.6/lib/python2.6/site-packages/numpy/core/include -I. -I/share/apps/gpaw-0.8.0-py2.6/include/python2.6 -c src/_png.cpp -o build/temp.linux-x86_64-2.6/src/_png.o cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++ src/_png.cpp: In member function 'Py::Object _png_module::read_png(const Py::Tuple&)': src/_png.cpp:353: error: invalid use of undefined type 'struct png_info_def' /share/apps/gpaw-0.8.0-py2.6/include/png.h:692: error: forward declaration of 'struct png_info_def' src/_png.cpp:354: error: invalid use of undefined type 'struct png_info_def' /share/apps/gpaw-0.8.0-py2.6/include/png.h:692: error: forward declaration of 'struct png_info_def' src/_png.cpp:356: error: invalid use of undefined type 'struct png_info_def' /share/apps/gpaw-0.8.0-py2.6/include/png.h:692: error: forward declaration of 'struct png_info_def' src/_png.cpp:364: error: invalid use of undefined type 'struct png_info_def' /share/apps/gpaw-0.8.0-py2.6/include/png.h:692: error: forward declaration of 'struct png_info_def' src/_png.cpp:377: error: invalid use of undefined type 'struct png_info_def' /share/apps/gpaw-0.8.0-py2.6/include/png.h:692: error: forward declaration of 'struct png_info_def' src/_png.cpp:383: error: invalid use of undefined type 'struct png_info_def' /share/apps/gpaw-0.8.0-py2.6/include/png.h:692: error: forward declaration of 'struct png_info_def' src/_png.cpp:411: error: invalid use of undefined type 'struct png_info_def' /share/apps/gpaw-0.8.0-py2.6/include/png.h:692: error: forward declaration of 'struct png_info_def'
On Sat, Sep 17, 2011 at 8:00 PM, <ob...@hu...> wrote: > Hello. > > I have some data with corresponding date value (Y-M-D) and having > hard time to understand how MPL works with dates. > I see it uses Python datetime, but I just can't figure how to make > plots when some date data is missing. > > Considering above, is there some easy way to make, lets say, 2 > variables plot where each variable could have 1-2 missing values? > Does date (abscissa) values have to follow some rules so that MPL > could recognize it as date? > > Cheers > > Maybe this example will help? http://matplotlib.sourceforge.net/faq/howto_faq.html#skip-dates-where-there-is-no-data Cheers! Ben Root
I am plotting an open fill path over a U.S. map for which I'd like to extend the filling all the way to the closest border of U.S. I thought I could use fill_between() my path and the path in the borders path list returned by drawcountries() that is closest to mine. So, I've been looking for examples on how to use fill_between() when 2 paths are known with no much luck for several days. Does anyone know a better approach to solve this issue? Does anyone know where I could find an example for fill_between() with 2 given paths as opposed to between 2 curves plotted in the same plot? Thanks
Hi Ben, Thanks. Using label_outer() does, as you say, only show labels on the edge and that is something I wanted to do. It doesn't, however, make a common y-axis label and a common x-axis label (instead there are now 2 of each, instead of 4). It appears that I might be able to add a common y and x label by brute-forcing the labels with text, along the lines of something like: fig.text(0.5,0.04,'common xlabel',ha='center',va='center') fig.text(0.00,0.5,'common > ylabel',ha='center',va='center',rotation='vertical') Now I just need to play with spacing and change precise ticklabels and I'll be able to finish this plot up! Thanks everyone, Brad On Tue, Sep 20, 2011 at 9:12 AM, Benjamin Root <ben...@ou...> wrote: > > > On Tue, Sep 20, 2011 at 11:06 AM, Brad Malone <bra...@gm...>wrote: > >> Hi Jeffrey, >> >> Thanks the response. Sorry about the term "global axis". That was clearly >> not the best way to say it. What I meant to say is global x axis LABEL and >> y-axis LABEL. This can be seen in this example ( >> http://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label?action=AttachFile&do=get&target=Same_ylabel_subplots.png >> ) >> >> although when I tried to do something similar with a 2x2 grid of plots it >> didn't seem to be working for me. Their example works due to these lines >> here >> >> import pylab >>> 2 >>> 3 figprops = dict(figsize=(8., 8. / 1.618), dpi=128) >>> # Figure properties >>> 4 adjustprops = dict(left=0.1, bottom=0.1, right=0.97, top=0.93, >>> wspace=0.2 hspace=0.2) # Subplot properties >>> 5 >>> 6 fig = pylab.figure(**figprops) >>> # New figure >>> 7 fig.subplots_adjust(**adjustprops) >>> # Tunes the subplot layout >>> 8 >>> 9 ax = fig.add_subplot(3, 1, 1) >>> 10 bx = fig.add_subplot(3, 1, 2, sharex=ax, sharey=ax) >>> 11 cx = fig.add_subplot(3, 1, 3, sharex=ax, sharey=ax) >>> 12 >>> 13 ax.plot([0,1,2], [2,3,4], 'k-') >>> 14 bx.plot([0,1,2], [2,3,4], 'k-') >>> 15 cx.plot([0,1,2], [2,3,4], 'k-') >>> 16 >>> 17 pylab.setp(ax.get_xticklabels(), visible=False) >>> 18 pylab.setp(bx.get_xticklabels(), visible=False) >>> 19 >>> 20 bx.set_ylabel('This is a long label shared among more axes', >>> fontsize=14) >>> 21 cx.set_xlabel('And a shared x label', fontsize=14) >> >> >> >> specifically probably the bx/cx_set label commands coupled with the sharex >> commands in the subplot label. But when I tried to add these things for my >> 2x2 plot it always looked like the label was attached to one of the plots or >> another instead of spanning the whole range. >> >> Thanks, >> Brad >> >> > Maybe the label_outer() function will be what you need. Call it for each > subplot axes, and set the labels as you would normally. matplotlib would > then set visible only the labels that are on the outside edge. > > Another option is to use the AxesGrid1 toolkit, which makes these things > easy. Also note that the soon-to-be released v1.1 will have a > tight_layout() function that can help with your spacing issues. > > Cheers! > Ben Root > >
On Tue, Sep 20, 2011 at 11:06 AM, Brad Malone <bra...@gm...> wrote: > Hi Jeffrey, > > Thanks the response. Sorry about the term "global axis". That was clearly > not the best way to say it. What I meant to say is global x axis LABEL and > y-axis LABEL. This can be seen in this example ( > http://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label?action=AttachFile&do=get&target=Same_ylabel_subplots.png > ) > > although when I tried to do something similar with a 2x2 grid of plots it > didn't seem to be working for me. Their example works due to these lines > here > > import pylab >> 2 >> 3 figprops = dict(figsize=(8., 8. / 1.618), dpi=128) >> # Figure properties >> 4 adjustprops = dict(left=0.1, bottom=0.1, right=0.97, top=0.93, >> wspace=0.2 hspace=0.2) # Subplot properties >> 5 >> 6 fig = pylab.figure(**figprops) >> # New figure >> 7 fig.subplots_adjust(**adjustprops) >> # Tunes the subplot layout >> 8 >> 9 ax = fig.add_subplot(3, 1, 1) >> 10 bx = fig.add_subplot(3, 1, 2, sharex=ax, sharey=ax) >> 11 cx = fig.add_subplot(3, 1, 3, sharex=ax, sharey=ax) >> 12 >> 13 ax.plot([0,1,2], [2,3,4], 'k-') >> 14 bx.plot([0,1,2], [2,3,4], 'k-') >> 15 cx.plot([0,1,2], [2,3,4], 'k-') >> 16 >> 17 pylab.setp(ax.get_xticklabels(), visible=False) >> 18 pylab.setp(bx.get_xticklabels(), visible=False) >> 19 >> 20 bx.set_ylabel('This is a long label shared among more axes', >> fontsize=14) >> 21 cx.set_xlabel('And a shared x label', fontsize=14) > > > > specifically probably the bx/cx_set label commands coupled with the sharex > commands in the subplot label. But when I tried to add these things for my > 2x2 plot it always looked like the label was attached to one of the plots or > another instead of spanning the whole range. > > Thanks, > Brad > > Maybe the label_outer() function will be what you need. Call it for each subplot axes, and set the labels as you would normally. matplotlib would then set visible only the labels that are on the outside edge. Another option is to use the AxesGrid1 toolkit, which makes these things easy. Also note that the soon-to-be released v1.1 will have a tight_layout() function that can help with your spacing issues. Cheers! Ben Root
Hi Jeffrey, Thanks the response. Sorry about the term "global axis". That was clearly not the best way to say it. What I meant to say is global x axis LABEL and y-axis LABEL. This can be seen in this example ( http://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label?action=AttachFile&do=get&target=Same_ylabel_subplots.png ) although when I tried to do something similar with a 2x2 grid of plots it didn't seem to be working for me. Their example works due to these lines here import pylab > 2 > 3 figprops = dict(figsize=(8., 8. / 1.618), dpi=128) > # Figure properties > 4 adjustprops = dict(left=0.1, bottom=0.1, right=0.97, top=0.93, > wspace=0.2 hspace=0.2) # Subplot properties > 5 > 6 fig = pylab.figure(**figprops) > # New figure > 7 fig.subplots_adjust(**adjustprops) > # Tunes the subplot layout > 8 > 9 ax = fig.add_subplot(3, 1, 1) > 10 bx = fig.add_subplot(3, 1, 2, sharex=ax, sharey=ax) > 11 cx = fig.add_subplot(3, 1, 3, sharex=ax, sharey=ax) > 12 > 13 ax.plot([0,1,2], [2,3,4], 'k-') > 14 bx.plot([0,1,2], [2,3,4], 'k-') > 15 cx.plot([0,1,2], [2,3,4], 'k-') > 16 > 17 pylab.setp(ax.get_xticklabels(), visible=False) > 18 pylab.setp(bx.get_xticklabels(), visible=False) > 19 > 20 bx.set_ylabel('This is a long label shared among more axes', > fontsize=14) > 21 cx.set_xlabel('And a shared x label', fontsize=14) specifically probably the bx/cx_set label commands coupled with the sharex commands in the subplot label. But when I tried to add these things for my 2x2 plot it always looked like the label was attached to one of the plots or another instead of spanning the whole range. Thanks, Brad On Tue, Sep 20, 2011 at 1:28 AM, Jeffrey Spencer <jef...@gm...>wrote: > Not sure what you mean global axis but I think I was trying to do > something similar with this. This is the chunk of one subplot. Specifically > look at last three lines: > ax = fig.add_subplot(2,2,2) > ax.set_title('b) 5') > ax.set_ylim((0,yUpper)) > for i in tempRun: > ax.plot(x,actSum[1,semi,i,semi], label=tempLabel[i], > linestyle=dashs[i%len(dashs)], color=plotColor[i%len(plotColor)]) > clear_spines(ax) > ax.set_xticklabels('') > ax.yaxis.set_ticks_position('left') > ax.xaxis.set_ticks_position('bottom') > > Cheers, > Jeff > > > On 20/09/11 09:20, Brad Malone wrote: > > Hello again, > > I've actually made some more progress on my last question after finding > this site: > http://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label > > and I was able to adjust the widths of my spacing. > > My current plot looks like this: > http://imageshack.us/photo/my-images/849/current.png/ > > with source code that looks like: > >> adjustprops = dict(left=0.1, bottom=0.1, right=0.97, top=0.93, >> wspace=0.25, hspace=0.25) >> fig=figure() >> fig.subplots_adjust(**adjustprops) >> >> ax=subplot(221) >> plot(x2cp,y2cp,'bo',markersize=3) >> #ax.set_title('2cP') >> text(12,0.03,'2cP') >> #ylabel('Displacement') >> axis([0,16,0,0.04]) >> bx=subplot(223) >> plot(x2cb,y2cb,'bo',markersize=3) >> #ax.set_title('2cB') >> text(12,0.225,'2cB') >> axis([0,16,0,0.3]) >> cx=subplot(222) >> plot(x6fp,y6fp,'bo',markersize=3) >> #ax.set_title('6fP') >> text(12,0.03375,'6fP') >> axis([0,16,0,0.045]) >> dx=subplot(224) >> plot(x6fb,y6fb,'bo',markersize=3) >> #ax.set_title('6fB') >> text(12,0.225,'6fB') >> axis([0,16,0,0.3]) >> >> >> show() > > > > Now the only thing I'd like to do now is create a global y-axis and a > global x-axis along the bottom for all 4 plots (which the website I linked > to above gives some hints about, but trying what I thought was equivalent > didn't work). And lastly, I wanted those y-axes which go from 0.000 to 0.040 > to instead go from 0.00 to 0.04 (i.e., only two decimal places, getting rid > of the ones that are in between). > > Thanks for any guidance you can give. > > Best, > Brad > > On Mon, Sep 19, 2011 at 3:32 PM, Brad Malone <bra...@gm...>wrote: > >> Hi, I am trying to do a simple 2x2 box of plots. My code is so far very >> simple, and simply looks something like this. >> >> ax=subplot(221) >>> >>> plot(x2cp,y2cp) >>> ax.set_title('2cP') >>> ylabel('Displacement') >>> ax=subplot(222) >>> plot(x2cb,y2cb) >>> ax.set_title('2cB') >>> ax=subplot(223) >>> plot(x6fp,y6fp) >>> ax.set_title('6fP') >>> ax=subplot(224) >>> plot(x6fb,y6fb) >>> ax.set_title('6fB') >>> show() >>> >>> >> But when I do this, the text and numbers from various plots overlap each >> other and get in the way (I noticed this is a common problem among the >> images in the matplotlib gallery as well). I have 2 questions: >> >> 1). How can I control the spacing, or padding, between the plots so that >> the numbers don't overlap? >> 2). Is there a way for me to have a single common y-axis label and x-axis >> label that runs along the full left-hand side and bottom, respectively? >> >> Thanks so much for the help! >> >> Brad >> > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense.http://p.sf.net/sfu/splunk-d2dcopy1 > > > > _______________________________________________ > Matplotlib-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Thank you very much Fabrice I have no further questions Cheers On Tue, Sep 20, 2011 at 1:43 PM, Fabrice Silva <si...@lm...>wrote: > Le mardi 20 septembre 2011 à 12:59 +0200, Klonuo Umom a écrit : > > > If you don't mind, I have another question. > > Those files are audio files. Can I limit dB range so that, let's say, > > noise below 120dB isn't drawn? Is there some parameter so I can set > > this range? > > specgram internally computed the spectrogram and then displays it into a > AxesImage instance (the im output argument). You can limit the range of > values the colormap extends by passing extra arguments to specgram that > are internally passed to the AxesImage.imshow method: > > See Argument "kwargs" in > > http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.specgram > and > > http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.imshow > > >>> Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=win, > noverlap=2, vmin=-120) > > -- > Fabrice Silva > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2dcopy1 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
I'm partial to wxFormBuilder myself, and the latest builds even have AUI support. There is no direct integration with matplotlib, though. To place a plot, all I do is create a wx.Panel in wxFormBuilder, and use that as a container for the plot (you would have a PlotPanel, which you derive from wx.Panel). You could also subclass that container same panel if you wanted to (within wxFormBuilder), but I don't see the need. On Tue, Sep 20, 2011 at 7:23 AM, Martijn <mar...@gm...> wrote: > Hi, > I am about to start wring a small application that includes a graphical > user interface written using wxPython and several matplotlib graphs. > Since I want to separate application logic and GUI code as much as > possible, I would like to use either XRC or Pythoncard. > Pythoncard seems to be the most straightforward and has recently > included a matplotlib widget. However, the website says that it requires > some modifications to Matplotlib. I would like to have some feedback > from people who have embedded Matplotlib into Pythoncard. > Alternatively, I could use XRC. This seems to be more mature/actively > developed but involves more GUI code (manually binding callbacks). What > are your experiences with embedding graphs in GUIs created using wxGlade > for wxFormBuilder? > > with kind regards, > > Martijn > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2dcopy1 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Daniel Hyams dh...@gm...
Hi, I am about to start wring a small application that includes a graphical user interface written using wxPython and several matplotlib graphs. Since I want to separate application logic and GUI code as much as possible, I would like to use either XRC or Pythoncard. Pythoncard seems to be the most straightforward and has recently included a matplotlib widget. However, the website says that it requires some modifications to Matplotlib. I would like to have some feedback from people who have embedded Matplotlib into Pythoncard. Alternatively, I could use XRC. This seems to be more mature/actively developed but involves more GUI code (manually binding callbacks). What are your experiences with embedding graphs in GUIs created using wxGlade for wxFormBuilder? with kind regards, Martijn
Le mardi 20 septembre 2011 à 12:59 +0200, Klonuo Umom a écrit : > If you don't mind, I have another question. > Those files are audio files. Can I limit dB range so that, let's say, > noise below 120dB isn't drawn? Is there some parameter so I can set > this range? specgram internally computed the spectrogram and then displays it into a AxesImage instance (the im output argument). You can limit the range of values the colormap extends by passing extra arguments to specgram that are internally passed to the AxesImage.imshow method: See Argument "kwargs" in http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.specgram and http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.imshow >>> Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=win, noverlap=2, vmin=-120) -- Fabrice Silva
Yes, it could be handy. I only needed it temporarily on couple of data files. If you don't mind, I have another question. Those files are audio files. Can I limit dB range so that, let's say, noise below 120dB isn't drawn? Is there some parameter so I can set this range? Thanks On Tue, Sep 20, 2011 at 12:27 PM, Fabrice Silva <si...@lm...>wrote: > Le mardi 20 septembre 2011 à 12:12 +0200, Klonuo Umom a écrit : > > Ah, I was using wrong parameter... Thanks. That works fine > > You could also use a callable (instead of the vector) so that specgram > internally automatically get a NFFT length window > > wrapper = lambda n: kaiser(n,8) > Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=wrapper, > noverlap=2) > > a wrapper is needed as specgram expects a function with a single argument > (as documented). > -- > Fabrice Silva > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2dcopy1 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Le mardi 20 septembre 2011 à 12:12 +0200, Klonuo Umom a écrit : > Ah, I was using wrong parameter... Thanks. That works fine You could also use a callable (instead of the vector) so that specgram internally automatically get a NFFT length window wrapper = lambda n: kaiser(n,8) Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=wrapper, noverlap=2) a wrapper is needed as specgram expects a function with a single argument (as documented). -- Fabrice Silva
Ah, I was using wrong parameter... Thanks. That works fine On Tue, Sep 20, 2011 at 8:27 AM, Fabrice Silva <si...@lm...>wrote: > Le lundi 19 septembre 2011 à 19:54 +0200, Klonuo Umom a écrit : > > I want to use kaiser window that's part of numpy for drawing spectrogram > > > > specgram(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, > > window=mlab.window_hanning, noverlap=128, > > cmap=None, xextent=None, pad_to=None, sides='default', > > scale_by_freq=None, **kwargs) > > > > *window*: callable or ndarray > > A function or a vector of length *NFFT*. To create window > > vectors see :func:`window_hanning`, :func:`window_none`, > > :func:`numpy.blackman`, :func:`numpy.hamming`, > > :func:`numpy.bartlett`, :func:`scipy.signal`, > > :func:`scipy.signal.get_window`, etc. The default is > > :func:`window_hanning`. If a function is passed as the > > argument, it must take a data segment as an argument and > > return the windowed version of the segment. > > > > So I tried: > > > > Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=kaiser, > > noverlap=2) > > TypeError: kaiser() takes exactly 2 arguments (1 given) > > Does the following solve your problem ? > NFFT = 1024 > win = kaiser(NFFT,8) # 8 is the shpe parameter of the window > Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=win, > noverlap=2) > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2dcopy1 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Not sure what you mean global axis but I think I was trying to do something similar with this. This is the chunk of one subplot. Specifically look at last three lines: ax = fig.add_subplot(2,2,2) ax.set_title('b) 5') ax.set_ylim((0,yUpper)) for i in tempRun: ax.plot(x,actSum[1,semi,i,semi], label=tempLabel[i], linestyle=dashs[i%len(dashs)], color=plotColor[i%len(plotColor)]) clear_spines(ax) ax.set_xticklabels('') ax.yaxis.set_ticks_position('left') ax.xaxis.set_ticks_position('bottom') Cheers, Jeff On 20/09/11 09:20, Brad Malone wrote: > Hello again, > > I've actually made some more progress on my last question after > finding this site: > http://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label > > and I was able to adjust the widths of my spacing. > > My current plot looks like this: > http://imageshack.us/photo/my-images/849/current.png/ > > with source code that looks like: > > adjustprops = dict(left=0.1, bottom=0.1, right=0.97, top=0.93, > wspace=0.25, hspace=0.25) > fig=figure() > fig.subplots_adjust(**adjustprops) > > ax=subplot(221) > plot(x2cp,y2cp,'bo',markersize=3) > #ax.set_title('2cP') > text(12,0.03,'2cP') > #ylabel('Displacement') > axis([0,16,0,0.04]) > bx=subplot(223) > plot(x2cb,y2cb,'bo',markersize=3) > #ax.set_title('2cB') > text(12,0.225,'2cB') > axis([0,16,0,0.3]) > cx=subplot(222) > plot(x6fp,y6fp,'bo',markersize=3) > #ax.set_title('6fP') > text(12,0.03375,'6fP') > axis([0,16,0,0.045]) > dx=subplot(224) > plot(x6fb,y6fb,'bo',markersize=3) > #ax.set_title('6fB') > text(12,0.225,'6fB') > axis([0,16,0,0.3]) > > > show() > > > > Now the only thing I'd like to do now is create a global y-axis and a > global x-axis along the bottom for all 4 plots (which the website I > linked to above gives some hints about, but trying what I thought was > equivalent didn't work). And lastly, I wanted those y-axes which go > from 0.000 to 0.040 to instead go from 0.00 to 0.04 (i.e., only two > decimal places, getting rid of the ones that are in between). > > Thanks for any guidance you can give. > > Best, > Brad > > On Mon, Sep 19, 2011 at 3:32 PM, Brad Malone <bra...@gm... > <mailto:bra...@gm...>> wrote: > > Hi, I am trying to do a simple 2x2 box of plots. My code is so far > very simple, and simply looks something like this. > > ax=subplot(221) > > plot(x2cp,y2cp) > ax.set_title('2cP') > ylabel('Displacement') > ax=subplot(222) > plot(x2cb,y2cb) > ax.set_title('2cB') > ax=subplot(223) > plot(x6fp,y6fp) > ax.set_title('6fP') > ax=subplot(224) > plot(x6fb,y6fb) > ax.set_title('6fB') > show() > > > But when I do this, the text and numbers from various plots > overlap each other and get in the way (I noticed this is a common > problem among the images in the matplotlib gallery as well). I > have 2 questions: > > 1). How can I control the spacing, or padding, between the plots > so that the numbers don't overlap? > 2). Is there a way for me to have a single common y-axis label and > x-axis label that runs along the full left-hand side and bottom, > respectively? > > Thanks so much for the help! > > Brad > > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2dcopy1 > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Le lundi 19 septembre 2011 à 19:54 +0200, Klonuo Umom a écrit : > I want to use kaiser window that's part of numpy for drawing spectrogram > > specgram(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, > window=mlab.window_hanning, noverlap=128, > cmap=None, xextent=None, pad_to=None, sides='default', > scale_by_freq=None, **kwargs) > > *window*: callable or ndarray > A function or a vector of length *NFFT*. To create window > vectors see :func:`window_hanning`, :func:`window_none`, > :func:`numpy.blackman`, :func:`numpy.hamming`, > :func:`numpy.bartlett`, :func:`scipy.signal`, > :func:`scipy.signal.get_window`, etc. The default is > :func:`window_hanning`. If a function is passed as the > argument, it must take a data segment as an argument and > return the windowed version of the segment. > > So I tried: > > Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=kaiser, > noverlap=2) > TypeError: kaiser() takes exactly 2 arguments (1 given) Does the following solve your problem ? NFFT = 1024 win = kaiser(NFFT,8) # 8 is the shpe parameter of the window Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=win, noverlap=2)
Hello again, I've actually made some more progress on my last question after finding this site: http://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label and I was able to adjust the widths of my spacing. My current plot looks like this: http://imageshack.us/photo/my-images/849/current.png/ with source code that looks like: > adjustprops = dict(left=0.1, bottom=0.1, right=0.97, top=0.93, wspace=0.25, > hspace=0.25) > fig=figure() > fig.subplots_adjust(**adjustprops) > > ax=subplot(221) > plot(x2cp,y2cp,'bo',markersize=3) > #ax.set_title('2cP') > text(12,0.03,'2cP') > #ylabel('Displacement') > axis([0,16,0,0.04]) > bx=subplot(223) > plot(x2cb,y2cb,'bo',markersize=3) > #ax.set_title('2cB') > text(12,0.225,'2cB') > axis([0,16,0,0.3]) > cx=subplot(222) > plot(x6fp,y6fp,'bo',markersize=3) > #ax.set_title('6fP') > text(12,0.03375,'6fP') > axis([0,16,0,0.045]) > dx=subplot(224) > plot(x6fb,y6fb,'bo',markersize=3) > #ax.set_title('6fB') > text(12,0.225,'6fB') > axis([0,16,0,0.3]) > > > show() Now the only thing I'd like to do now is create a global y-axis and a global x-axis along the bottom for all 4 plots (which the website I linked to above gives some hints about, but trying what I thought was equivalent didn't work). And lastly, I wanted those y-axes which go from 0.000 to 0.040 to instead go from 0.00 to 0.04 (i.e., only two decimal places, getting rid of the ones that are in between). Thanks for any guidance you can give. Best, Brad On Mon, Sep 19, 2011 at 3:32 PM, Brad Malone <bra...@gm...> wrote: > Hi, I am trying to do a simple 2x2 box of plots. My code is so far very > simple, and simply looks something like this. > > ax=subplot(221) >> >> plot(x2cp,y2cp) >> ax.set_title('2cP') >> ylabel('Displacement') >> ax=subplot(222) >> plot(x2cb,y2cb) >> ax.set_title('2cB') >> ax=subplot(223) >> plot(x6fp,y6fp) >> ax.set_title('6fP') >> ax=subplot(224) >> plot(x6fb,y6fb) >> ax.set_title('6fB') >> show() >> >> > But when I do this, the text and numbers from various plots overlap each > other and get in the way (I noticed this is a common problem among the > images in the matplotlib gallery as well). I have 2 questions: > > 1). How can I control the spacing, or padding, between the plots so that > the numbers don't overlap? > 2). Is there a way for me to have a single common y-axis label and x-axis > label that runs along the full left-hand side and bottom, respectively? > > Thanks so much for the help! > > Brad >
Hi, I am trying to do a simple 2x2 box of plots. My code is so far very simple, and simply looks something like this. ax=subplot(221) > > plot(x2cp,y2cp) > ax.set_title('2cP') > ylabel('Displacement') > ax=subplot(222) > plot(x2cb,y2cb) > ax.set_title('2cB') > ax=subplot(223) > plot(x6fp,y6fp) > ax.set_title('6fP') > ax=subplot(224) > plot(x6fb,y6fb) > ax.set_title('6fB') > show() > > But when I do this, the text and numbers from various plots overlap each other and get in the way (I noticed this is a common problem among the images in the matplotlib gallery as well). I have 2 questions: 1). How can I control the spacing, or padding, between the plots so that the numbers don't overlap? 2). Is there a way for me to have a single common y-axis label and x-axis label that runs along the full left-hand side and bottom, respectively? Thanks so much for the help! Brad
I want to use kaiser window that's part of numpy for drawing spectrogram specgram(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=128, cmap=None, xextent=None, pad_to=None, sides='default', scale_by_freq=None, **kwargs) *window*: callable or ndarray A function or a vector of length *NFFT*. To create window vectors see :func:`window_hanning`, :func:`window_none`, :func:`numpy.blackman`, :func:`numpy.hamming`, :func:`numpy.bartlett`, :func:`scipy.signal`, :func:`scipy.signal.get_window`, etc. The default is :func:`window_hanning`. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. So I tried: Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=kaiser, noverlap=2) TypeError: kaiser() takes exactly 2 arguments (1 given) Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=kaiser(x, 8), noverlap=2) ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=blackman, noverlap=2) ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() Can someone help? Thanks
On 09/14/2011 05:48 PM, Benjamin Root wrote: > > > On Wed, Sep 14, 2011 at 4:34 PM, CAB <ca...@ya... > <mailto:ca...@ya...>> wrote: > > > But now, let's say I want to italicize only the 'f' and 'x'. I > can't find any easy way to do that while retaining the Arial font. > > And no, I don't want to use TeX. Target users' computers might > not have it. > > > That's fine, that's why matplotlib imitates TeX with mathtext... > > > I've tried using mathtext, but that uses one of mathtext's fonts, > not mine (computer modern, etc., or sansserif, etc.) > > > I am sure there must be some way to change the font, but Arial might > not be supported for this... haven't tried though. Mathtext only works with particular math fonts -- in order to do math layout, extra metrics are required to be in the font that aren't in most standard fonts such as Arial. We need some sort of rich text support in matplotlib (such as HTML-like or something), but it doesn't currently exist. Mike
Hi Ben, Finally, I updated ti Python 2.6.7, numpy 1.6.1, and matplotlib 1.0.1. The update solved the problem. Thanks, marc On Wed, Aug 10, 2011 at 8:41 PM, Marc Magrans de Abril <mar...@gm...> wrote: > Hi Ben, > > I will try to do it. Once it is done I let you know. > > Cheers, > marc > > On Wed, Aug 10, 2011 at 7:41 PM, Benjamin Root <ben...@ou...> wrote: >> >> >> On Wed, Aug 10, 2011 at 12:32 PM, Marc Magrans de Abril >> <mar...@gm...> wrote: >>> >>> Dear colleagues, >>> >>> I'm trying to display an histogram with logarithmic bins using the >>> logarithmic scale in the x-axis. When I execute the attached python >>> script it crashes giving a "Bus Error" message (see also the attached >>> core dump). >>> >>> If I remove the line "plt.xscale('log')" the script goes up to the end. >>> >>> I'm running the program on MacOS 10.6.8, Python 2.5, numpy 1.2.1, and >>> matplotlib 0.98.5.2. >>> >>> Anyone knows the reason of the crash? >>> >>> Thanks, >>> marc >>> >> >> If I remember correctly, there was a log-scale bug in plt.hist() that got >> fixed a little while back. Your version of numpy and matplotlib is a little >> old. Is it possible to update those two packages on your system? >> >> Ben Root >> >> >
The interactive plot has been done using the AntTweakBar library and is not really user friendly. You can view the source from the demos directory: http://code.google.com/p/glumpy/source/browse/demos/atb.py Also, note that glumpy is not a replacement for matplotlib but rather a testbed for a future OpenGL backend to be integrated into matplotlib. Nicolas On Sep 18, 2011, at 14:00 , Stef Mientki wrote: > hi Nicolas, > > looks very interesting. > > I was considering to move from MatPlotLib to guiqwt, > because of it's easy interactive plots. > But I see glumpy has it too. > Can show the source code for the interactive plot in your examples ? > > thanks, > stef > > > On 17-09-2011 19:22, Nicolas Rougier wrote: >> >> >> Hi folks, >> >> I am pleased to announce a new release of glumpy, a small python library for the (very) fast vizualization of numpy arrays, (mainly two dimensional) that has been designed with efficiency in mind. If you want to draw nice figures for inclusion in a scientific article, you’d better use matplotlib but if you want to have a sense of what’s going on in your simulation while it is running, then maybe glumpy can help you. >> >> >> Download and screenshots at: http://code.google.com/p/glumpy/ >> >> Nicolas >> >> >> ------------------------------------------------------------------------------ >> BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA >> http://p.sf.net/sfu/rim-devcon-copy2 >> >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > http://p.sf.net/sfu/rim-devcon-copy2_______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
A leading space is missing in the output of mpl.text(1, 1, '% .3f' % 1.234) if used within the TeX backend. Whereas it is not missing in the plain non-TeX backend. Here is an example: import pylab as mpl #mpl.rcParams['text.usetex'] = False mpl.rcParams['text.usetex'] = True mpl.plot([1,3,2]) mpl.text(1, 2.0, '% .3f' % 1.234) mpl.text(1, 1.9, '% .3f' % -1.234) mpl.show() Ciao Andreas