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
(2) |
2
(8) |
3
(8) |
4
(3) |
5
(15) |
6
(11) |
7
(4) |
8
|
9
(3) |
10
(21) |
11
(5) |
12
(7) |
13
(10) |
14
(12) |
15
(3) |
16
(4) |
17
(16) |
18
(20) |
19
(11) |
20
(9) |
21
(1) |
22
|
23
(15) |
24
(11) |
25
(1) |
26
(9) |
27
(5) |
28
|
29
(1) |
30
|
31
(6) |
|
|
|
|
hi, i observed a similar problem that persists in matplotlib 0.90.1 (python 2.5, numpy 1.0.1, ipython 0.7.3). the problem occurs when a window is closed and it seems to be specific to the non-interactive mode using the GTK or GTKAgg backend. the following short script runs ok once, but when i try to run it a second time, python hangs: # start script import pylab as P P.ioff() P.figure() P.close() # stop script this is probably a problem of matplotlib and we should continue this thread on the matplotlib email list. cheers, kilian > From: "John Hunter" <jd...@gm...> > > Date: July 13, 2007 1:10:35 PM PDT > > To: "SciPy Users List" < sci...@sc...> > > Subject: Re: [SciPy-user] (Mac) Close a plot window, crash IPython? > > Reply-To: SciPy Users List < sci...@sc...> > > > > On 7/13/07, David Warde-Farley <dav...@ut...> wrote: > > > >> It does seem as though the *exact* same bug was reported today on > >> matplotlib-devel (what are the odds?), I shall checkout the svn > >> version and see if that fixes it, and make them aware of the other > >> WX- > >> related bug as well. > > > > I hope this does fix your problem, but the bug that was fixed was also > > recently introduced (in a svn commit after the 0.90.1 release) so it > > may not be your problem. But if you can update from svn and see if > > the problem is still there, that would be a great start. See you on > > the matplotlib-devel side :-) > > > > JDH > > _______________________________________________ > > SciPy-user mailing list > > Sci...@sc... > > http://projects.scipy.org/mailman/listinfo/scipy-user > >
Stephen George wrote: > > Hi, > > Can MatPlotLib create a graph similar to the attached GnuPlot graph? Steve, That is a 3D plot, and matplotlib is fundamentally 2D. Some 3D plotting ability has been added, but it is mostly unmaintained and incomplete. Eric
Hi, Can MatPlotLib create a graph similar to the attached GnuPlot graph? I have used contour before, .. but would like to also get the surface projection, .. above the contour I'd prefer to use just the one plotting library for my work, not keen to install yet another plotting library. Thanks Steve
John Travers wrote: > On 16/07/07, Michael Droettboom <md...@st...> wrote: >> I wonder if these troubles are related to my recent changes to subset >> the fonts. Could you try setting the rc variable ps.fonttype to 42, and >> let me know if that works? > > It is something to do with fonts, if I remove the line: > > rc('font',**{'family':'sans-serif','sans-serif':['DejaVu > Sans'],'size':12}) > > the problem goes away. I'll try and construct a minimal script if you > want, but I guess the above is where the problem lies. Is this line > wrong in some way? That line is not wrong. It turns out that the DejaVu fonts (unlike any of the fonts I had tested with) have newline characters in the Copyright string. This was messing up the comments in the PostScript file. Thanks for helping to find this bug! It should be fixed in 3538. Cheers, Mike
On Monday 16 July 2007 7:27:46 am John Travers wrote: > Hi all, > > I recently updated my subversion of matplotlib after a few months. Now > scripts that used to work fine are giving the following error (when > using ps backend xpdf): [...] > My system has otherwise not changed. I am on ubuntu fiesty, python > 2.5.1, gcc 4.1.2, numpy 1.0.4.dev3883, ESP Ghostscript 815.04. One thing: the traceback is unfortunately not very helpful, but I did notice this line: > xpdf_distill(tmpfile, ext=='.eps', ptype=papertype, bbox=bbox) That should read ext='eps', not ==. Any idea how the extra = got there? If that is not the problem, please attach as simple a script as possible that reproduces the problem, along with any changes you have made to your rc settings. I use the xpdf distiller all the time and havent had any problems, although I cant build mpl this morning so I don't know when I will be able to test the most recent svn changes. Darren
Hi all, I recently updated my subversion of matplotlib after a few months. Now scripts that used to work fine are giving the following error (when using ps backend xpdf): -------------------- ESP Ghostscript 815.04: Unrecoverable error, exit code 1 Traceback (most recent call last): File "MF_disp_visible.py", line 22, in <module> legendpos=legendpos) File "/home/john/thesis/figures/pytools/plots.py", line 171, in plot_oney fig.savefig(filename+'_raw.eps') File "/usr/lib/python2.5/site-packages/matplotlib-0.90.1_r3536-py2.5-linux-i686.egg/matplotlib/figure.py", line 769, in savefig self.canvas.print_figure(*args, **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib-0.90.1_r3536-py2.5-linux-i686.egg/matplotlib/backends/backend_ps.py", line 1063, in print_figure xpdf_distill(tmpfile, ext=='.eps', ptype=papertype, bbox=bbox) File "/usr/lib/python2.5/site-packages/matplotlib-0.90.1_r3536-py2.5-linux-i686.egg/matplotlib/backends/backend_ps.py", line 1329, in xpdf_distill image.\n\Here is the report generated by ghostscript:\n\n' + fh.read()) RuntimeError: ps2pdf was not able to process your image. \Here is the report generated by ghostscript: ERROR: /undefined in Copyright Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop --nostringval-- 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:1126/1686(ro)(G)-- --dict:0/20(G)-- --dict:107/200(L)-- --dict:6/7(L)-- Current allocation mode is local Last OS error: 2 Current file position is 703 ------------------- And this error if not using xpdf: ------------------- "gs" -dNOPAUSE -dBATCH -sDEVICE=bbox -c "<</PageSize [9400 9400] /PageOffset [3000 3000]>> setpagedevice" -f "/tmp/gsview6Ye4fd" ESP Ghostscript 815.04 (2007年03月14日) Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. ERROR: /undefined in Copyright Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:1122/1686(ro)(G)-- --dict:0/20(G)-- --dict:105/200(L)-- --dict:6/7(L)-- Current allocation mode is local Last OS error: 2 Current file position is 750 Ghostscript failed to obtain bounding box *** glibc detected *** epstool: double free or corruption (!prev): 0x08091158 *** ======= Backtrace: ========= /lib/tls/i686/cmov/libc.so.6[0xb7e767cd] /lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7e79e30] /lib/tls/i686/cmov/libc.so.6(fclose+0x134)[0xb7e65844] epstool[0x8049e8a] epstool[0x804ca64] epstool[0x8050a20] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc)[0xb7e24ebc] epstool[0x8048dd1] ======= Memory map: ======== 08048000-0807f000 r-xp 00000000 08:07 593687 /usr/bin/epstool 0807f000-08080000 rw-p 00036000 08:07 593687 /usr/bin/epstool 08080000-080b1000 rw-p 08080000 00:00 0 [heap] b7c00000-b7c21000 rw-p b7c00000 00:00 0 b7c21000-b7d00000 ---p b7c21000 00:00 0 b7e0e000-b7e0f000 rw-p b7e0e000 00:00 0 b7e0f000-b7f4a000 r-xp 00000000 08:07 82596 /lib/tls/i686/cmov/libc-2.5.so b7f4a000-b7f4b000 r--p 0013b000 08:07 82596 /lib/tls/i686/cmov/libc-2.5.so b7f4b000-b7f4d000 rw-p 0013c000 08:07 82596 /lib/tls/i686/cmov/libc-2.5.so b7f4d000-b7f50000 rw-p b7f4d000 00:00 0 b7f5e000-b7f69000 r-xp 00000000 08:07 48929 /lib/libgcc_s.so.1 b7f69000-b7f6a000 rw-p 0000a000 08:07 48929 /lib/libgcc_s.so.1 b7f6a000-b7f6d000 rw-p b7f6a000 00:00 0 b7f6d000-b7f86000 r-xp 00000000 08:07 48888 /lib/ld-2.5.so b7f86000-b7f88000 rw-p 00019000 08:07 48888 /lib/ld-2.5.so bf8b5000-bf8ca000 rw-p bf8b5000 00:00 0 [stack] ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso] Aborted (core dumped) ---------------- My system has otherwise not changed. I am on ubuntu fiesty, python 2.5.1, gcc 4.1.2, numpy 1.0.4.dev3883, ESP Ghostscript 815.04. Any help would be much appreciated. Thanks, John Travers
Mark Bakker wrote: > Hello, I never noticed the 'annotate' option in pylab. > I have been trying unsuccesfully to get it to work. I have fixed the problem of inconsistent and incorrect docstrings in annotate, so it should be easier for the next person who stumbles over it to make it work. Eric
On 7/15/07, Navid Parvini <par...@ya...> wrote: > In stead of saving the figure by "pylab.savefig()" command, I want to get > the figure in > array type. > > Would you please help me to do that? Here is an example using agg import matplotlib matplotlib.use('Agg') from pylab import figure, show import numpy as npy # make an agg figure fig = figure() ax = fig.add_subplot(111) ax.plot([1,2,3]) ax.set_title('a simple figure') fig.canvas.draw() # grab the pixel buffer and dump it into a numpy array buf = fig.canvas.buffer_rgba(0,0) l, b, w, h = fig.bbox.get_bounds() X = npy.fromstring(buf, npy.uint8) X.shape = h,w,4 # now display the array X as an Axes in a new figure for illustration fig2 = figure() ax2 = fig2.add_subplot(111, frameon=False) ax2.imshow(X) fig2.savefig('simple.png') show()
Dear All, In stead of saving the figure by "pylab.savefig()" command, I want to get the figure in array type. Would you please help me to do that? Thanks. Navid --------------------------------- Got a little couch potato? Check out fun summer activities for kids.
On 14/07/07, John Hunter <jd...@gm...> wrote: > > Thanks John, that works great! > > You're welcome. If you are a svn user, I added a more efficient > poly_between to matplotlib.mlab and updated the fill_between.py > example, which shows filling below, above and between. Thanks John, I'll take a look. Cheers Adam
On 7/14/07, David Warde-Farley <dw...@cs...> wrote: > > Bus error > > > > This is using recent svn builds of numpy and maplotlib. In particular, you need to make sure you remove your build directory and your install directory, get the latest svn, and do a clean rebuild. JDH
On Jul 14, 2007, at 3:43 PM, David Warde-Farley wrote: > Hi Chris, > > This just came up I think a day or so ago. Are you using TkAgg as > your backend, I am using TkAgg > and are you closing the plot window in between the two histograms? > Yes. > Try updating from svn, Andrew just fixed a bug. Will try, thanks. -- Christopher Fonnesbeck + Atlanta, GA + fonnesbeck at mac dot com + Contact me on AOL IM using email address
Hi Chris, This just came up I think a day or so ago. Are you using TkAgg as your backend, and are you closing the plot window in between the two histograms? Try updating from svn, Andrew just fixed a bug. David On 14-Jul-07, at 2:05 PM, Chris Fonnesbeck wrote: > I get a repeatable bus error when trying to plot more than > one histogram of simulated data. The first plot is generated > without error, but invariably a second plot crashes: > > In [4]: x = random.negative_binomial(2, 0.25, 1000) > > In [5]: from pylab import * > > In [6]: hist(x) > Out[6]: > (array([240, 318, 206, 102, 65, 38, 17, 5, 6, 3]), > array([ 0., 3., 6., 9., 12., 15., 18., 21., 24., 27.]), > <a list of 10 Patch objects>) > > In [7]: show() > > In [8]: x = random.negative_binomial(2, 0.5, 1000) > > In [9]: hist(x) > Bus error > > This is using recent svn builds of numpy and maplotlib. > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
I get a repeatable bus error when trying to plot more than one histogram of simulated data. The first plot is generated without error, but invariably a second plot crashes: In [4]: x = random.negative_binomial(2, 0.25, 1000) In [5]: from pylab import * In [6]: hist(x) Out[6]: (array([240, 318, 206, 102, 65, 38, 17, 5, 6, 3]), array([ 0., 3., 6., 9., 12., 15., 18., 21., 24., 27.]), <a list of 10 Patch objects>) In [7]: show() In [8]: x = random.negative_binomial(2, 0.5, 1000) In [9]: hist(x) Bus error This is using recent svn builds of numpy and maplotlib.
On 7/14/07, Adam Mercer <ram...@gm...> wrote: > On 14/07/07, John Hunter <jd...@gm...> wrote: > > > OK, the problem with this code is fill expects the vertices of the > > polygon you want filled and you are only providing the top part, not > > the bottom. The modified version of your code fills between your line > > and the bottom of zero > > Thanks John, that works great! You're welcome. If you are a svn user, I added a more efficient poly_between to matplotlib.mlab and updated the fill_between.py example, which shows filling below, above and between. def poly_between(x, ylower, yupper): """ given a sequence of x, ylower and yupper, return the polygon that fills the regions between them. ylower or yupper can be scalar or iterable. If they are iterable, they must be equal in length to x return value is x, y arrays for use with Axes.fill """ Nx = len(x) if not iterable(ylower): ylower = ylower*npy.ones(Nx) if not iterable(yupper): yupper = yupper*npy.ones(Nx) x = npy.concatenate( (x, x[::-1]) ) y = npy.concatenate( (yupper, ylower[::-1]) ) return x,y
On 14/07/07, John Hunter <jd...@gm...> wrote: > OK, the problem with this code is fill expects the vertices of the > polygon you want filled and you are only providing the top part, not > the bottom. The modified version of your code fills between your line > and the bottom of zero Thanks John, that works great! Cheers Adam
On 7/14/07, Adam Mercer <ram...@gm...> wrote: > I've attached the complete code > > ./params.py --min-mass 4 --max-mass 100 --output test.png OK, the problem with this code is fill expects the vertices of the polygon you want filled and you are only providing the top part, not the bottom. The modified version of your code fills between your line and the bottom of zero We do need to provide some helper functions to make this easier
On 14/07/07, John Hunter <jd...@gm...> wrote: > OK, you'll probably need to give us a complete, free standing example > for us to debug this. I've attached the complete code ./params.py --min-mass 4 --max-mass 100 --output test.png Cheers Adam >
On 7/14/07, Adam Mercer <ram...@gm...> wrote: > I found these examples whilst trying to get the fill() method to work > but couldn't get anything working. I added the line > > axes.fill(mass, minimum_mass(options, mass), facecolor='red', alpha=0.5) > > which, if I'm following the example correctly, should fill the area > under the minimum mass line red, but it has no effect on the plot. OK, you'll probably need to give us a complete, free standing example for us to debug this.
On 14/07/07, John Hunter <jd...@gm...> wrote: > On 7/14/07, Adam Mercer <ram...@gm...> wrote: > > > I'm trying to shade a couple of areas of a plot I'm creating, I need > > to shade the area above one line and the area below another. > > According to the documentation it looks like I need to use the fill() > > method but I can't get it to work, the code I use for creating the > > plot is below: > > The cookbook entry > > http://www.scipy.org/Cookbook/Matplotlib/SigmoidalFunctions > > illustrates how to fill below lines -- it is a little more > complicated, because it fills below the intersection of two lines, but > it should help. See also > http://matplotlib.sf.net/examples/fill_demo.py I found these examples whilst trying to get the fill() method to work but couldn't get anything working. I added the line axes.fill(mass, minimum_mass(options, mass), facecolor='red', alpha=0.5) which, if I'm following the example correctly, should fill the area under the minimum mass line red, but it has no effect on the plot. Cheers Adam
On 7/14/07, Adam Mercer <ram...@gm...> wrote: > I'm trying to shade a couple of areas of a plot I'm creating, I need > to shade the area above one line and the area below another. > According to the documentation it looks like I need to use the fill() > method but I can't get it to work, the code I use for creating the > plot is below: The cookbook entry http://www.scipy.org/Cookbook/Matplotlib/SigmoidalFunctions illustrates how to fill below lines -- it is a little more complicated, because it fills below the intersection of two lines, but it should help. See also http://matplotlib.sf.net/examples/fill_demo.py JDH
Hi I'm trying to shade a couple of areas of a plot I'm creating, I need to shade the area above one line and the area below another. According to the documentation it looks like I need to use the fill() method but I can't get it to work, the code I use for creating the plot is below: # import required modules from matplotlib import matplotlib from matplotlib import figure from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas # set matplotlib plot parameters matplotlib.rcParams.update({ "font.size": 8.0, "axes.titlesize": 10.0, "axes.labelsize": 10.0, "xtick.labelsize": 8.0, "ytick.labelsize": 8.0, "legend.fontsize": 8.0, "figure.dpi": 300, "savefig.dpi": 300, "text.usetex": True }) def parameter_space_plot(options): # setup figure fig = figure.Figure() FigureCanvas(fig) fig.set_size_inches(5, 5) axes = fig.gca() axes.grid(True) axes.set_xlabel("Mass 1 / $M_\odot$") axes.set_ylabel("Mass 2 / $M_\odot$") # setup mass array mass = numpy.arange(0, options.max_mass + 1, 1) # plot min/max mass lines axes.plot(mass, minimum_mass(options, mass), 'b-') axes.plot(mass, maximum_mass(options, mass), 'b-') # plot equal mass line axes.plot(mass, mass, 'k--') # set axes limits axes.set_xlim([0, options.max_mass]) axes.set_ylim([0, options.max_mass]) # return plot return fig could anyone give me pointers as to how I could shade the region of the plot about the maximum mass line and the area below the minimum mass line? Cheers Adam
Darren Dale wrote: > If we can figure out how to get it from numpy, we can use numpy's isnan as > well, and drop that bit of extension code from mpl's sources. Done in r3512. Hurray for inclusion instead of code duplication. (I originally copied that stuff from numarray, which inspired numpy's design of that stuff, but since back then would couldn't depend on either...) > On Friday 13 July 2007 10:32:15 am John Hunter wrote: >> I'm happy to do this, if someone can advise how to get a portable >> isinf. Also in r3512, I inserted the definition of isfinite, copied from numpy's umathmodule.c.src at the top of _transforms.cpp. If it works for numpy, it should work for us. I'm slightly worried that this stuff will break on MSVC... Does anyone have the ability to test this svn revision sooner than later? -Andrew
For the archives (and further proof that programming done during the witching hour between 4pm and 5pm should be avoided at all costs): The solution is easy. for tick in axes.yaxis.get_major_ticks(): tick.set_pad(-25) tick.label2.set_horizontalalignment('right') A> =20 > -----Original Message----- > From: Anthony M. Floyd=20 > Sent: July 12, 2007 4:37 PM > To: mat...@li... > Subject: [Matplotlib-users] Properly aligned tick labels on the inside >=20 > Hi All, >=20 > I'm trying to plot tick labels on the inside (ie data side)=20 > of a typical x-y plot. My setup is Python 2.5.1, matplotlib=20 > 0.90.0 on WinXP. >=20 > I've been able to accomplish this by adjusting the padding of=20 > the individual ticks, but it doesn't quite accomplish what I want. >=20 > For example, imagine a typical x-y plot, except that the tick=20 > labels are on the right-hand side (by setting=20 > axes.yaxis.tick_right()). Adjusting the padding of the ticks=20 > by doing: >=20 > for tick in axes.yaxis.get_major_ticks(): > tick.set_pad(-25) >=20 > I'm able to get the numbers to appear about where I want. =20 > The problem is that these numbers are left aligned. So, it=20 > works fine for small numbers, but for large numbers, or when=20 > my tick formatter switches over to using scientific notation=20 > the numbers will overlap the axis. If my labels are on the=20 > inside of the right-hand side, I want them to be=20 > right-aligned and grow left towards the centre of the plot. >=20 > I thought about doing it by setting tick_left() and then=20 > using a (large) computed pad, but then the tick lines are on=20 > the wrong side. >=20 > So, my question is: can I get right-aligned tick labels on=20 > the right-side of a plot? How? >=20 > I suspect I can do this by using=20 > axis.set_offset_position('...'), but I've been unable to get=20 > that to do anything in my tests using pylab. >=20 > I can post code if it'll be helpful. >=20 > Thanks, > Anthony. >=20 > -- > Anthony Floyd, PhD > Convergent Manufacturing Technologies Inc. > 6190 Agronomy Rd, Suite 403 > Vancouver BC V6T 1Z3 > CANADA >=20 > Email: Ant...@co... | Tel: 604-822-9682 > WWW: http://www.convergent.ca | Fax: 604-822-9659 =20 >=20 > CMT is hiring: See http://www.convergent.ca for details >=20 >=20 >=20 > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by DB2 Express Download DB2=20 > Express C - the FREE version of DB2 express and take control=20 > of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >=20 >=20
On Friday 13 July 2007 10:32:15 am John Hunter wrote: > On 7/13/07, Darren Dale <dd...@co...> wrote: > > I think this might trace back to Interval.get_bounds() in > > src/_transforms.h. Maybe we could consider an additional Interval method > > like > > Interval.get_finite_bounds(), which could do something like numpy's > > isfinite function to filter values that can not be plotted. But I'm not > > an expert on mpl's transforms, so perhaps someone more knowledgeable can > > comment. > > I'm happy to do this, if someone can advise how to get a portable > isinf. [...] > I would be happy to > import it from numpy (since we can now rely on it, woohoo) but am > having trouble here too.... If we can figure out how to get it from numpy, we can use numpy's isnan as well, and drop that bit of extension code from mpl's sources. > I see isfinite defined in > umathmodule.c.src (and also in ufuncobject.h but only for _MSC_VER. > If anyone can advise on how to get isinf or isfinite, pease do.