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
(1) |
2
(43) |
3
(17) |
4
(12) |
5
(9) |
6
(14) |
7
(8) |
8
|
9
(15) |
10
(16) |
11
(11) |
12
(10) |
13
(20) |
14
(7) |
15
(4) |
16
(16) |
17
(25) |
18
(10) |
19
(27) |
20
(26) |
21
(6) |
22
(20) |
23
(12) |
24
(15) |
25
(22) |
26
(15) |
27
(43) |
28
(8) |
29
(6) |
30
(12) |
|
|
|
|
|
Hi all, I'm trying to plot in 2D, 3 variables from time series, instead of volume I want color for the third variable. I have partial success with a scatter plot, but I'm unable to manage the colorbar so it represents z values, I needed to sort the variables and it's getting a bit ugly, so I though I might be missing some other function ? this is what I used: pylab.figure() x=self.stData[items[0]] y=self.stData[items[1]] z=self.stData[items[2]] points=zip(x,y) points3=sorted(zip(z,points)) for i,p in enumerate(points3): z[i]=p[0] x[i]=p[1][0] y[i]=p[1][1] #colors=pylab.linspace(z.min(),z.max(),len(z)) did not work colors=pylab.linspace(0,1,len(z)) pylab.scatter(x,y,c=colors,faceted=False) pylab.colorbar() pylab.show() but even if I could get the colorbar ticks to represent z values, in fact this is not correct as this gives every point "one" color, and this is not correct... -- View this message in context: http://www.nabble.com/color-xy-plot-tp18038983p18038983.html Sent from the matplotlib - users mailing list archive at Nabble.com.
I'm not very familiar with how axes3d works, but just by looking at the number of transform calls and objects, it appears that it will take significant effort to update it. It was never one of the goals of the transformation refactoring to have that working. Personally, I'm +1 on removing axes3d.py to avoid confusion. However, a motivated user could follow the information in API_CHANGES to update axes3d.py. I'd be happy to help if you got stuck, but I don't really have the motivation/mandate to do the whole thing myself. Cheers, Mike Matthias Michler wrote: > Hello list, > > I know it is not recommended to use matplotlib for 3d plotting, but for a > while simple plots worked fine for me. This is not the case with actual svn > version and therefore my question is: Would it break at lost or cost much > effort to make the 3d-plot-examples of the Cookbook work? > > if I try: > [1] import matplotlib.axes3d as p3 > I get the error attached below. > > Thanks for any advise in advance. > > best regards Matthias > > --------------------------------------------------------------------------- > <type 'exceptions.ImportError'> Traceback (most recent call last) > > /home/michler/CompPhys_2008/Uebungsaufgaben/050_Antidot/3D_matplotlib/<ipython > console> in <module>() > > /scratch/michler/SOFT/lib/python2.5/site-packages/matplotlib/axes3d.py in > <module>() > 14 from axes import Axes > 15 import cbook > ---> 16 from transforms import unit_bbox > 17 > 18 import numpy as np > > <type 'exceptions.ImportError'>: cannot import name unit_bbox > >> /scratch/michler/SOFT/lib/python2.5/site-packages/matplotlib/axes3d.py(16)<module>() >> > 15 import cbook > ---> 16 from transforms import unit_bbox > 17 > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
Hello list, I know it is not recommended to use matplotlib for 3d plotting, but for a while simple plots worked fine for me. This is not the case with actual svn version and therefore my question is: Would it break at lost or cost much effort to make the 3d-plot-examples of the Cookbook work? if I try: [1] import matplotlib.axes3d as p3 I get the error attached below. Thanks for any advise in advance. best regards Matthias --------------------------------------------------------------------------- <type 'exceptions.ImportError'> Traceback (most recent call last) /home/michler/CompPhys_2008/Uebungsaufgaben/050_Antidot/3D_matplotlib/<ipython console> in <module>() /scratch/michler/SOFT/lib/python2.5/site-packages/matplotlib/axes3d.py in <module>() 14 from axes import Axes 15 import cbook ---> 16 from transforms import unit_bbox 17 18 import numpy as np <type 'exceptions.ImportError'>: cannot import name unit_bbox > /scratch/michler/SOFT/lib/python2.5/site-packages/matplotlib/axes3d.py(16)<module>() 15 import cbook ---> 16 from transforms import unit_bbox 17
> On Fri, Jun 20, 2008 at 8:41 AM, Alan G Isaac <ai...@am...> wrote: >> If anyone wants to share an example where it is useful to >> work "backwards" like that, I'm sure I would learn from >> it. On 2008年6月20日, John Hunter wrote: > Take a look at the draggable rectangle code in the example below. > ... The PDF event handling tutorial which contains this > example is at > http://matplotlib.sourceforge.net/pycon/event_handling_tut.pdf Ah, I'm learning more than I bargained for! But very usefully as it turns out. Thanks! Alan
On Fri, Jun 20, 2008 at 8:41 AM, Alan G Isaac <ai...@am...> wrote: >> On Thu, Jun 19, 2008 at 3:37 PM, Alan G Isaac <ai...@am...> wrote: >>> I still do not see why a figure has a canvas as data. > > On 2008年6月19日, John Hunter apparently wrote: >> This is just a convenience so the child can see the parent. If I have >> a function that gets a line, I can do line.axes.figure.canvas and walk >> backwards up the containment hierarchy to get what I need. This is >> backwards because a canvas holds a figure which holds an axes which >> holds a line, but everybody stores a reference to their parent. A >> side effect of having so many cyclic references is that we cannot use >> __del__ anywhere in the mpl class hierarchy since this breaks garbage >> collection with cyclic references. > > Thanks for the explanation! > Alan > PS If anyone wants to share an example where it is useful > to work "backwards" like that, I'm sure I would learn > from it. Take a look at the draggable rectangle code in the example below. The rDraggableRectangle class needs to be able to update the canvas with a draw, but rather than having to pass in the canvas instance explicitly, we can just get it from the rectangle. Ie, the artist knows what canvas he is in even though the canvas contains the rectangle. The PDF event handling tutorial which contains this example is at http://matplotlib.sourceforge.net/pycon/event_handling_tut.pdf if you want some context. import numpy as np import matplotlib.pyplot as plt class DraggableRectangle: def __init__(self, rect): self.rect = rect self.press = None def connect(self): 'connect to all the events we need' self.cidpress = self.rect.figure.canvas.mpl_connect( 'button_press_event', self.on_press) self.cidrelease = self.rect.figure.canvas.mpl_connect( 'button_release_event', self.on_release) self.cidmotion = self.rect.figure.canvas.mpl_connect( 'motion_notify_event', self.on_motion) def on_press(self, event): 'on button press we will see if the mouse is over us and store some data' if event.inaxes != self.rect.axes: return contains, attrd = self.rect.contains(event) if not contains: return print 'event contains', self.rect.xy x0, y0 = self.rect.xy self.press = x0, y0, event.xdata, event.ydata def on_motion(self, event): 'on motion we will move the rect if the mouse is over us' if self.press is None: return if event.inaxes != self.rect.axes: return x0, y0, xpress, ypress = self.press dx = event.xdata - xpress dy = event.ydata - ypress #print 'x0=%f, xpress=%f, event.xdata=%f, dx=%f, x0+dx=%f'%(x0, xpress, event.xdata, dx, x0+dx) self.rect.set_x(x0+dx) self.rect.set_y(y0+dy) self.rect.figure.canvas.draw() def on_release(self, event): 'on release we reset the press data' self.press = None self.rect.figure.canvas.draw() def disconnect(self): 'disconnect all the stored connection ids' self.rect.figure.canvas.mpl_disconnect(self.cidpress) self.rect.figure.canvas.mpl_disconnect(self.cidrelease) self.rect.figure.canvas.mpl_disconnect(self.cidmotion) fig = plt.figure() ax = fig.add_subplot(111) rects = ax.bar(range(10), 20*np.random.rand(10)) drs = [] for rect in rects: dr = DraggableRectangle(rect) dr.connect() drs.append(dr) plt.show()
> On Thu, Jun 19, 2008 at 3:37 PM, Alan G Isaac <ai...@am...> wrote: >> I still do not see why a figure has a canvas as data. On 2008年6月19日, John Hunter apparently wrote: > This is just a convenience so the child can see the parent. If I have > a function that gets a line, I can do line.axes.figure.canvas and walk > backwards up the containment hierarchy to get what I need. This is > backwards because a canvas holds a figure which holds an axes which > holds a line, but everybody stores a reference to their parent. A > side effect of having so many cyclic references is that we cannot use > __del__ anywhere in the mpl class hierarchy since this breaks garbage > collection with cyclic references. Thanks for the explanation! Alan PS If anyone wants to share an example where it is useful to work "backwards" like that, I'm sure I would learn from it.
On Fri, Jun 20, 2008 at 12:39 AM, Paul Hartley <pha...@gm...> wrote: > > the broken_barh collection seems to lack the get_edgecolor() and get_color() > fxns, yet you can set the edge colors with set_edgecolor(). Is there some > way to get the edge colors of these guys? Hmm, it appears we accidentally left this method out, but I just added it to svn. If you don't have access to svn, you can "cheat" and do col._edgecolors JDH
On Fri, Jun 20, 2008 at 2:26 AM, David Goldsmith <d_l...@ya...> wrote: > > That example doesn't do anything on my computer... Look again :-) It created a file called test.png in the directory in which you ran the example. As long as you include the last line in the example (the print_figure" line) it will save a figure. JDH
On Thu, Jun 19, 2008 at 12:36:02PM -0500, John Hunter wrote: > On Thu, Jun 19, 2008 at 11:02 AM, John Hunter <jd...@gm...> wrote: > > >> I want to adjust the x position of my ylabel, like > >> > >> subplot(111) > >> ylabel('YLabel', x=-.25, y=.75) > >> > >> the 'y=.75' argument is applied but the 'x=-.2' argument has no affect. > >> But why? Have you any idea to do this? > > > > The x position is automatically determined by the size of the > > yticklabels. We should provide a means to override this x position, > > but it is not possible currently. > > Since our typical mantra is "we don't do much autolayout but we make > it possible for you to layout your figure as you like", I wasn't > satisfied with my answer, so I committed a patch to svn which supports > setting the label coords. See the example below Oh, thank you very much. The gca().yaxis.set_label_coords(x, y) command works fine for me :-) But one qusetion. I think the user interface ylabel('yLabel', xpos, ypos) would be better. So I would do somethink like this in ylabel() if xpos is not None: self.set_label_coords(xpos, ypos) What do you think? Many thanks, Friedrich
That example doesn't do anything on my computer... DG --- On Thu, 6/19/08, Scott Sinclair <sin...@uk...> wrote: > From: Scott Sinclair <sin...@uk...> > Subject: Re: [Matplotlib-users] Image plotting using the OO interface > To: Mat...@li... > Date: Thursday, June 19, 2008, 3:58 AM > >>> David Goldsmith <d_l...@ya...> > 06/19/08 9:39 AM >>> > Hi! I'm having trouble figuring out how to plot an > array as an image with the OO interface - please help > (e.g., w/ an example). Thanks, > > DG > >>> > > >From the examples > http://matplotlib.sourceforge.net/matplotlib_examples_0.98.0.zip > > ../examples/api/agg_oo.py > > -------------------------------------------- > #!/usr/bin/env python > """ > A pure OO (look Ma, no pylab!) example using the agg > backend > """ > from matplotlib.backends.backend_agg import FigureCanvasAgg > as FigureCanvas > from matplotlib.figure import Figure > > fig = Figure() > canvas = FigureCanvas(fig) > ax = fig.add_subplot(111) > ax.plot([1,2,3]) > ax.set_title('hi mom') > ax.grid(True) > ax.set_xlabel('time') > ax.set_ylabel('volts') > canvas.print_figure('test') > -------------------------------------------- > > You can replace the call to ax.plot() with a call to > ax.imshow() or ax.pcolor() > > Hope that gets you going. > > Cheers, > Scott > > Please find our Email Disclaimer here: > http://www.ukzn.ac.za/disclaimer/ > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Ryan May wrote: > Yves Revaz wrote: > >> Hi all, >> >> When I use: >> >> colorbar(orientation='horizontal') >> >> the color bar is drawn on the bottom of the corresponding graph. >> Which option will draw the colorbar on the top of the graph ? >> > > I think (correct me if I'm wrong devs) you'll have to use the cax > keyword argument to manually specifiy the position of the axes in which > to draw the colorbar. You'll also need to adjust the position of the > plot using figure.subplots_adjust. Like this maybe: > > import numpy as np > import matplotlib.pyplot as plt > data = np.random.randn(30,30) > plt.pcolor(data) > fig = plt.gcf() > fig.subplots_adjust(top=0.85) > ax = fig.add_axes([0.12, 0.9, 0.8, 0.05]) > plt.colorbar(cax=ax, orientation='horizontal') > > Hope this helps, > > ok, it works fine for that case. Now, my problem is that my graph is a subplot: Taking your example it corresponds to : import numpy as np import matplotlib.pyplot as plt fig = plt.gcf() plt.subplot(2,2,2) data = np.random.randn(30,30) plt.pcolor(data) fig.subplots_adjust(top=0.85) ax = fig.add_axes([0.12, 0.9, 0.8, 0.05]) plt.colorbar(cax=ax, orientation='horizontal') plt.show() Obviously, the colorbar has now the length of the whole figure and not the one of the subplot ! :-( I should do a "subplots_adjust" to the subplot and not to the "fig", but how can I do that ? Thanks, yves > Ryan > > -- > Ryan May > Graduate Research Assistant > School of Meteorology > University of Oklahoma > -- (o o) --------------------------------------------oOO--(_)--OOo------- Yves Revaz Laboratory of Astrophysics EPFL Observatoire de Sauverny Tel : ++ 41 22 379 24 28 51. Ch. des Maillettes Fax : ++ 41 22 379 22 05 1290 Sauverny e-mail : Yve...@ep... SWITZERLAND Web : http://www.lunix.ch/revaz/ ----------------------------------------------------------------
Eric Firing wrote: > Bill Baxter wrote: >> >> I tried putting this in my matplotlibrc but it seems to have no effect: >> >> font.size : 30.0 >> >> Just to make sure things were actually working I also tried this: >> >> font.weight : bold >> >> That one worked, all text on the plot turned bold. That suggests to >> me that the global font size setting probably just has a bug at the >> moment. > > I see one slightly obscure bug that is not the cause of this problem. Fixed in the branch and trunk. > > The big problem appears to be that although the mechanism is in place > for all this nice global control, it is not being *used* by default. > That is, the default sizes for axis labels and such are all given in > points, not using the strings "medium" etc. As a workaround you could > make a matplotlibrc file with the strings substituted for all the font > sizes in points that you can find; but it looks like this is something > we really need to fix. Fixed in the trunk--please check it. Eric
the broken_barh collection seems to lack the get_edgecolor() and get_color() fxns, yet you can set the edge colors with set_edgecolor(). Is there some way to get the edge colors of these guys?
No guarantees on when I'll have time, but I'll work on it. Thanks for the info. -- Curtis On Thu, Jun 19, 2008 at 8:17 AM, John Hunter <jd...@gm...> wrote: > On Wed, Jun 18, 2008 at 2:43 PM, Curtis Jensen <cu...@th...> wrote: >> Nice. Thanks. I had tried to do something similar, but kept getting >> a curved line between each data point. >> Also, I too got errors with a previous versions of matplotlib, but 0.98 works. >> >> If someone were willing to add Radar plots to the matplotlib >> functionality, would this be wanted by the users or maintainers? > > Yes, certainly. You may want to take a look at the polar > implementation (can you inherit from it?) to reuse as much as > possible. Michael has also written a short guide to developers > working with nonlinear projections > > http://matplotlib.sourceforge.net/doc/html/devel/add_new_projection.html > > JDH >
Bill Baxter wrote: > Thanks for the reply. > > On Fri, Jun 20, 2008 at 10:32 AM, Darren Dale <dsd...@gm...> wrote: >> On Thursday 19 June 2008 9:13:15 pm Bill Baxter wrote: >>> On Fri, Jun 20, 2008 at 10:01 AM, Darren Dale <dsd...@gm...> wrote: >>>> Hi Bill, >>>> >>>> On Thursday 19 June 2008 8:18:12 pm Bill Baxter wrote: >>>>> Matplot folks, >>>>> Is there a way to increase all font sizes globally across the board? >>>>> I played around with some RC parameters but they don't seem to have >>>>> any effect. >>>> Here's a note from the default matplotlibrc: >>>> >>>> # note that font.size controls default text sizes. To configure >>>> # special text sizes tick labels, axes, labels, title, etc, see the rc >>>> # settings for axes and ticks. Special text sizes can be defined >>>> # relative to font.size, using the following values: xx-small, x-small, >>>> # small, medium, large, x-large, xx-large, larger, or smaller >>>> #font.size : 12.0 >>>> >>>> You set that size, and then set a relative size (like "medium") for your >>>> other settings. I should include this in the new docs, if it is not >>>> covered already. >>> According to the docs the rc function is supposed to be able to do the >>> same thing as editing matplotlibrc. >>> I tried doing >>> rc('font', size=20) >>> and several variations of that invoked at several different places in >>> my file, and it seemed to have no effect. >>> >>> Did I do it wrong? Does rc() not really work as advertised? >>> Something completely different? >> I think in this case, you need to change those settings before importing >> pylab: >> >> import matplotlib >> matplotlib.rcParams['font.size'] = 12 >> import pylab > > I see. I usually just do it in one shot like: > from matplotlib import pylab as plot > >> or better yet, do it with a matplotlibrc file >> >>> For what it's worth my matplotlib.pylab.__version__ is '1.1.0' >> Really? That looks like numpy's version, not matplotlib's. > > I guess it's just namespace weirdness then. Using the import > incantation I gave above, plot.__version__ reports 1.1.0. > matplotlib.__version__ gives '0.98.0'. > > I tried putting this in my matplotlibrc but it seems to have no effect: > > font.size : 30.0 > > Just to make sure things were actually working I also tried this: > > font.weight : bold > > That one worked, all text on the plot turned bold. That suggests to > me that the global font size setting probably just has a bug at the > moment. I see one slightly obscure bug that is not the cause of this problem. The big problem appears to be that although the mechanism is in place for all this nice global control, it is not being *used* by default. That is, the default sizes for axis labels and such are all given in points, not using the strings "medium" etc. As a workaround you could make a matplotlibrc file with the strings substituted for all the font sizes in points that you can find; but it looks like this is something we really need to fix. Eric > > --bb > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
On Thu, Jun 19, 2008 at 9:19 PM, Charles Moad <cw...@gm...> wrote: > Seems like that one little fix did the trick. I ran several examples and > haven't had any problems. Committed now. Thanks Charlie! Can you provide some basic instructions for those of us on osx how we can enable and test this backend? JDH
On Jun 12, 2008, at 4:27 PM, John Hunter wrote: > On Thu, Jun 12, 2008 at 2:58 PM, İsmail Dönmez <is...@na...> > wrote: >> Hi all, >> >> I was trying matplotlib 0.98.0 and Qt4 backend works great but Coca >> backend seems to be broken : > > Charlie, > > any chance you can try and port cocoaagg over to the new trunk api. > figure.dpi is no longer a lazy value, but a plain ol number. There > are probably a few other changes that will need to be made as well. > I'd like to clear up as many of these problems as we can and shoot for > a bugfix release next week. > > JDH Seems like that one little fix did the trick. I ran several examples and haven't had any problems. Committed now. - Charlie
Thanks for the reply. On Fri, Jun 20, 2008 at 10:32 AM, Darren Dale <dsd...@gm...> wrote: > On Thursday 19 June 2008 9:13:15 pm Bill Baxter wrote: >> On Fri, Jun 20, 2008 at 10:01 AM, Darren Dale <dsd...@gm...> wrote: >> > Hi Bill, >> > >> > On Thursday 19 June 2008 8:18:12 pm Bill Baxter wrote: >> >> Matplot folks, >> >> Is there a way to increase all font sizes globally across the board? >> >> I played around with some RC parameters but they don't seem to have >> >> any effect. >> > >> > Here's a note from the default matplotlibrc: >> > >> > # note that font.size controls default text sizes. To configure >> > # special text sizes tick labels, axes, labels, title, etc, see the rc >> > # settings for axes and ticks. Special text sizes can be defined >> > # relative to font.size, using the following values: xx-small, x-small, >> > # small, medium, large, x-large, xx-large, larger, or smaller >> > #font.size : 12.0 >> > >> > You set that size, and then set a relative size (like "medium") for your >> > other settings. I should include this in the new docs, if it is not >> > covered already. >> >> According to the docs the rc function is supposed to be able to do the >> same thing as editing matplotlibrc. >> I tried doing >> rc('font', size=20) >> and several variations of that invoked at several different places in >> my file, and it seemed to have no effect. >> >> Did I do it wrong? Does rc() not really work as advertised? >> Something completely different? > > I think in this case, you need to change those settings before importing > pylab: > > import matplotlib > matplotlib.rcParams['font.size'] = 12 > import pylab I see. I usually just do it in one shot like: from matplotlib import pylab as plot > or better yet, do it with a matplotlibrc file > >> For what it's worth my matplotlib.pylab.__version__ is '1.1.0' > > Really? That looks like numpy's version, not matplotlib's. I guess it's just namespace weirdness then. Using the import incantation I gave above, plot.__version__ reports 1.1.0. matplotlib.__version__ gives '0.98.0'. I tried putting this in my matplotlibrc but it seems to have no effect: font.size : 30.0 Just to make sure things were actually working I also tried this: font.weight : bold That one worked, all text on the plot turned bold. That suggests to me that the global font size setting probably just has a bug at the moment. --bb
On Thursday 19 June 2008 9:13:15 pm Bill Baxter wrote: > On Fri, Jun 20, 2008 at 10:01 AM, Darren Dale <dsd...@gm...> wrote: > > Hi Bill, > > > > On Thursday 19 June 2008 8:18:12 pm Bill Baxter wrote: > >> Matplot folks, > >> Is there a way to increase all font sizes globally across the board? > >> I played around with some RC parameters but they don't seem to have > >> any effect. > > > > Here's a note from the default matplotlibrc: > > > > # note that font.size controls default text sizes. To configure > > # special text sizes tick labels, axes, labels, title, etc, see the rc > > # settings for axes and ticks. Special text sizes can be defined > > # relative to font.size, using the following values: xx-small, x-small, > > # small, medium, large, x-large, xx-large, larger, or smaller > > #font.size : 12.0 > > > > You set that size, and then set a relative size (like "medium") for your > > other settings. I should include this in the new docs, if it is not > > covered already. > > According to the docs the rc function is supposed to be able to do the > same thing as editing matplotlibrc. > I tried doing > rc('font', size=20) > and several variations of that invoked at several different places in > my file, and it seemed to have no effect. > > Did I do it wrong? Does rc() not really work as advertised? > Something completely different? I think in this case, you need to change those settings before importing pylab: import matplotlib matplotlib.rcParams['font.size'] = 12 import pylab or better yet, do it with a matplotlibrc file > For what it's worth my matplotlib.pylab.__version__ is '1.1.0' Really? That looks like numpy's version, not matplotlib's. Darren
Hi I have a plot that has two different y-axis scales and I want appropriate tick marks for the different y-axes. ie I want the tick marks on the left axis to correspond to the scale on the left axis etc... As far as I can tell the way to accomplish this, after consulting the documentation, is to use the tick_left() and tick_right() methods, I therefore have the following code: axes1.yaxis.tick_left() axes1.yaxis.set_major_locator(pylab.MultipleLocator(0.1)) axes1.yaxis.set_minor_locator(pylab.MultipleLocator(0.05)) axes2.yaxis.tick_right() axes2.yaxis.set_major_locator(pylab.MultipleLocator(5)) axes2.yaxis.set_minor_locator(pylab.MultipleLocator(1)) but the minor ticks are on both the left and right y-axes. How can I make the minor ticks for axes1 only appear on the the left and the minor ticks for axes2 appear on the right? Cheers Adam
On Fri, Jun 20, 2008 at 10:01 AM, Darren Dale <dsd...@gm...> wrote: > Hi Bill, > > On Thursday 19 June 2008 8:18:12 pm Bill Baxter wrote: >> Matplot folks, >> Is there a way to increase all font sizes globally across the board? >> I played around with some RC parameters but they don't seem to have >> any effect. > > Here's a note from the default matplotlibrc: > > # note that font.size controls default text sizes. To configure > # special text sizes tick labels, axes, labels, title, etc, see the rc > # settings for axes and ticks. Special text sizes can be defined > # relative to font.size, using the following values: xx-small, x-small, > # small, medium, large, x-large, xx-large, larger, or smaller > #font.size : 12.0 > > You set that size, and then set a relative size (like "medium") for your other > settings. I should include this in the new docs, if it is not covered > already. According to the docs the rc function is supposed to be able to do the same thing as editing matplotlibrc. I tried doing rc('font', size=20) and several variations of that invoked at several different places in my file, and it seemed to have no effect. Did I do it wrong? Does rc() not really work as advertised? Something completely different? For what it's worth my matplotlib.pylab.__version__ is '1.1.0' --bb
Hi Bill, On Thursday 19 June 2008 8:18:12 pm Bill Baxter wrote: > Matplot folks, > Is there a way to increase all font sizes globally across the board? > I played around with some RC parameters but they don't seem to have > any effect. Here's a note from the default matplotlibrc: # note that font.size controls default text sizes. To configure # special text sizes tick labels, axes, labels, title, etc, see the rc # settings for axes and ticks. Special text sizes can be defined # relative to font.size, using the following values: xx-small, x-small, # small, medium, large, x-large, xx-large, larger, or smaller #font.size : 12.0 You set that size, and then set a relative size (like "medium") for your other settings. I should include this in the new docs, if it is not covered already. Darren
Matplot folks, Is there a way to increase all font sizes globally across the board? I played around with some RC parameters but they don't seem to have any effect. I found that I could more or less achieve the desired result by the following steps: 1) plot to something like subplot(6,6,1). That is, make a 6x6 plot grid but only use the upper left subplot of it. With that the text is large relative to the plot, but spacing is not good, so... 2) Make plot window really large so text isn't overlapping so much 3) Save result to svg 4) in Inkscape or other svg editor cut out the big unused region, and fix badly positioned labels (e.g. text too far left in legend box). That basically worked, but it's quite hacky. I think it's pretty obvious why this would be useful, but if not, my particular use case is that I want to make some graphs that will be very small in the final document, so the text needs to be at about 9pt in an overall bounding box of approx. 3cm x 2cm. This question was asked once before in 2006 but apparently got no answer: http://sourceforge.net/mailarchive/message.php?msg_name=1137144577.12809.4.camel%40inpc93.et.tudelft.nl Thanks for any hints! --bb
On Thu, Jun 19, 2008 at 7:07 PM, Darren Dale <dsd...@gm...> wrote: > You are looking for two_scales.py, it is distributed with matplotlib's > collection of examples: > http://matplotlib.sourceforge.net/matplotlib_examples_0.98.0.zip Thanks Darren, thats exactly what I was after. I must of overlooked that. Cheers Adam
Hi Adam, On Thursday 19 June 2008 8:01:32 pm Adam Mercer wrote: > I'm trying to produce a single plot containing two different datasets > that share the same x-axis but different y-axes, i.e. I would like one > y-axis to be on the left of the plot and the other on the right hand > side. I've looked for example that illustrates how to do this but have > been unable to find an example. Can anyone point me to and example or > the appropriate methods that would allow me to do this? You are looking for two_scales.py, it is distributed with matplotlib's collection of examples: http://matplotlib.sourceforge.net/matplotlib_examples_0.98.0.zip Darren