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
(20) |
2
(16) |
3
(9) |
4
(12) |
5
(14) |
6
(22) |
|
7
(17) |
8
(33) |
9
(26) |
10
(32) |
11
(47) |
12
(26) |
13
(7) |
|
14
(24) |
15
(44) |
16
(42) |
17
(22) |
18
(31) |
19
(8) |
20
(4) |
|
21
(15) |
22
(27) |
23
(41) |
24
(33) |
25
(31) |
26
(24) |
27
(10) |
|
28
(20) |
|
|
|
|
|
|
|
From: dred <dou...@gm...> - 2010-02-12 15:09:43
|
Not read it myself but 'Matplotlib for Python Developers' might be what you're after - see review http://dalelane.co.uk/blog/?p=1222 Best way to learn Matplotlib is to use a good IDE like Spyder. I find it much easier than IPython. http://code.google.com/p/spyderlib/ Installing Python(x,y) is the easiest way to set it all up. Doug Wayne Watson wrote: > > > > > > > > Thanks for the info. I'm semi-resistant to ipython. I tried if for a > few hours, and it seemed a bit too much like linux. Years ago I used > linux a lot, and enjoyed it. I'll consider it. Windows is the game now. > > Yes, actual use is good, but the needed imports seem a bit baffling. > scipy, pylab, matplotlib, ...? What components do I only need for a > particular use? > > The videos you mentioned could be helpful. > > I do not belong to any group, and my small town is a long way from any > educational resources.What I learn is from a few books, FAQs, and > recently the MPL Guide. Within a 50 mile radius, I know exactly one > other person who knows Python. He's a very bright high school student. > > On 2/9/2010 10:33 PM, Gökhan Sever wrote: > > > On Tue, Feb 9, 2010 at 8:15 PM, Wayne Watson > < sie...@sb... > > wrote: > Subject > is the question. > > As I see it, it's useful to know MatLab. A simple query with matplotlib > tutorial shows a number of hits. The first, reference to v0.99.a > documentation barely qualifies. Examples galore and a pretty minimal > introduction. In the first 10 or so hits ther's a blog and mention of a > video. The blog may appeal to some, but it seems unelementary. The video > basically asks to sign in. Who knows where that goes? I've seen a few > videos for MPL, but they all look tied into $$. > > I've made some reasonable progress on MPL, but am still far short of > being confident of using it. Too much try this and see. > > I know of exactly one book on MPL ( for scientists. sounds interesting). > It was published recently by a foreign author. It is not yet widely > distributed. > > Your turn. Comments? > -- > "Crime is way down. War is declining. And that's far from the good > news." -- Steven Pinker (and other sources) Why is this true, but yet > the media says otherwise? The media knows very well how to manipulate us > (see limbic, emotion, $$). -- WTW > > > > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as > DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > For me best way to learn is to use it actually :) Especially on > homework and projects. Mailing lists are also very helpful as you are > already doing. > > Try with ipython --pylab option. > > Also check SciPy09 ( http://conference.scipy.org/SciPy2009/ ) > videos. There are one introductory and advanced tutorials that you can > see online (without registering) or downloading to your computer. > > > > -- > Gökhan > > > -- > "Crime is way down. War is declining. And that's far from the good > news." -- Steven Pinker (and other sources) > Why is this true, but yet the media says otherwise? The media > knows very well how to manipulate us (see limbic, emotion, $$). -- WTW > > > > > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://old.nabble.com/How-Does--One-Learn-to-Use-MatPlotLib--tp27525289p27564958.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Bruce F. <br...@cl...> - 2010-02-12 14:11:27
|
Thanks for this. I didn't realize that N could be an array and contour would know that these are the levels desired. I found similar in an example, but not in the contour documentation. Thanks so much! Bruce --------------------------------------- Bruce W. Ford Clear Science, Inc. br...@cl... bru...@na... http://www.ClearScienceInc.com Phone/Fax: 904-379-9704 8241 Parkridge Circle N. Jacksonville, FL 32211 Skype: bruce.w.ford Google Talk: fo...@gm... On Fri, Feb 12, 2010 at 7:29 AM, Matthias Michler <Mat...@gm...> wrote: > Hi Bruce, > > why don't you use contour as in the following ;-) > > contour(X,Y,Z,V) > # -> draw contour lines at the values specified in sequence *V* > > like in > > x, y = np.meshgrid(np.linspace(0, 1, 100), np.linspace(0, 1, 50)) > z = x**4 - x**2 + np.sin(y) > contour(x, y, z, [-0.2, 0.0, 0.2, 0.4, 0.6, 0.8]) > > Kind regards, > Matthias > > On Thursday 11 February 2010 21:58:15 Bruce Ford wrote: >> In using the contour as in: >> >> contour(X,Y,Z,N) >> >> N is a number of automatically chosen levels. >> >> I would like to contour based on data divisions. >> >> For instance, perhaps I'd like to use a contour or color-fill >> (contourf) every 2 units. I'm not seeing how to accomplish this. Any >> points in the right direction would be appreciated. >> >> Thanks! >> >> Bruce > > > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Stephan M. <zw...@we...> - 2010-02-12 13:55:26
|
Calling the garbage collector (gc.collect()) also makes no difference. Even deleting all references manually and dropping the toolbar code doesn't do the trick. Am 09.02.2010 16:19, schrieb Stephan Markus: > I already had my destroy() method look like this: > > def destroy(self): > self.f.clf() > Tix.Frame.destroy(self) > self.toolbar.destroy() > self.canvas._tkcanvas.destroy() > > > But it makes no difference. > > Stephan > > Am 08.02.2010 17:15, schrieb Michael Droettboom: > >> Have you tried explicitly calling .clf() on the matplotlib Figure object from your Tix.Frame.destroy callback? >> >> Mike >> >> >> |
|
From: Philipp L. <phi...@tu...> - 2010-02-12 10:55:00
|
Hi,
is there a backend that supports 16bit tiff images?
According to the website GDK supports tiff but that's wrong:
>>>import matplotlib
>>>matplotlib.use('GDK')
>>>import matplotlib.pyplot as pyplot
>>>pyplot.imsave(arr=X, fname='test.tif')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/pymodules/python2.6/matplotlib/pyplot.py", line 1425, in
imsave
return _imsave(*args, **kwargs)
File "/usr/lib/pymodules/python2.6/matplotlib/image.py", line 813, in imsave
fig.savefig(fname, dpi=1, format=format)
File "/usr/lib/pymodules/python2.6/matplotlib/figure.py", line 1033, in
savefig
self.canvas.print_figure(*args, **kwargs)
File "/usr/lib/pymodules/python2.6/matplotlib/backend_bases.py", line
1420, in print_figure
'%s.' % (format, ', '.join(formats)))
ValueError: Format "tif" is not supported.
Supported formats: emf, eps, pdf, png, ps, raw, rgba, svg, svgz.
>>>matplotlib.backends.backend
'gdk'
matplotlib 0.99.0 python 2.6.4 ubuntu karmic x64
If matplotlib cannot provide tiff support, does someone know an
alternative? PIL doesn't work either, at least not intuitively.
Cheers
Philipp
--
Philipp Lies
Max Planck Institute for Biological Cybernetics
Computational Vision & Neuroscience Group
Spemannstr. 41
D-72076 Tuebingen
Germany
Phone: +49-7071-601-1788
Fax: +49-7071-601-552
E-Mail: phi...@tu...
http://www.kyb.mpg.de/bethgegroup
|
|
From: Geoff B. <geo...@gm...> - 2010-02-12 09:44:06
|
On Thu, Feb 11, 2010 at 4:58 PM, John Hunter <jd...@gm...> wrote: > On Thu, Feb 11, 2010 at 9:43 AM, Geoff Bache <geo...@je...> wrote: >> >> Hi all, >> >> I'm trying to generate graphs from my test results, with regions >> coloured with succeeded and failing tests. It nearly works, but I have >> the following problem. I am providing the data with fill_between, which >> returns PolyCollection objects which cannot be provided to a legend. So >> I use the "proxy artist" trick, as described here >> >> http://matplotlib.sourceforge.net/users/legend_guide.html#plotting-guide-legend >> > The only reason fill_between uses a PolyCollection is to support the > "where" keyword argument for non-contiguous fill regions, which you do > not appear to be using. Actually, not using it wasn't out of choice. I couldn't figure out how to make it stop plotting at one point at start again at the next. In my example, is there a way to plot the red regions using a single call and "where"? I tried this where = [False, True, True, True, False, True] axessubplot4.fill_between([0, 1, 2, 3, 4, 5], [2, 2, 2, 8, 8, 15], [2, 2, 4, 8, 8, 18], where=where, color='#FF3118', linewidth=2, linestyle='-') but that fails to plot either to or from point 4, whereas actually I just want it to leave out the region between points 3 and 4 (where the values are equal) Regards, Geoff |
|
From: Brendan B. <bre...@br...> - 2010-02-12 08:32:13
|
I'm trying to find the quickest way to erase a rectangular area of
the figure canvas. I tried using canvas.restore_region with the
optional bbox argument, but there seems to be some mismatch between
the measurement units of the saved buffer object and the currently
shown data. For instance, if I have a Text object on my plot, I tried
this:
bbox = g.text.get_window_extent()
canvas.restore_region(background, bbox)
. . . but it does not correctly block out the text. (The restored
rectangle from the background appears elsewhere on the axes.) How can
I convert the buffer coordinates to the coordinates of the the
displayed plot?
I also tried creating a patch with the same bounds as the text bbox
and adding it to the axes, but this seems to have no effect. Do I
have to do something besides ax.draw_artist(mypatch) to get it to draw?
This is part of the same thing I posted about a few days ago with
trying to do an animation with many moving parts. Are there any
examples of animations which do not involve restoring the entire
background with each draw, but rather individually erasing individual
elements in the plot and redrawing them elsewhere? That's what I'm
trying to do here.
Thanks,
--
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is
no path, and leave a trail."
--author unknown
|
|
From: Geoff B. <geo...@gm...> - 2010-02-12 07:59:32
|
Many thanks for the suggestions, will try these out today. Incidentally, it looks like there is an interesting bug in the mail archive software. Viewing my original message there I can see that it has removed all instances of the combination "pre" (that's p then r then e if it eats this too!). It does this even in the middle of words, such as "previous", "appreciate" etc. Regards, Geoff On Thu, Feb 11, 2010 at 6:44 PM, Jae-Joon Lee <lee...@gm...> wrote: > Or, you may fool the algorithm to find the best location by adding > invisible lines. > For example, > > axessubplot4.set_autoscale_on(False) > l1, = axessubplot4.plot([4, 5], [8, 18]) > l1.set_visible(False) > axessubplot4.set_autoscale_on(True) > > Regards, > > -JJ > > > On Thu, Feb 11, 2010 at 10:58 AM, John Hunter <jd...@gm...> wrote: >> On Thu, Feb 11, 2010 at 9:43 AM, Geoff Bache <geo...@je...> wrote: >>> >>> Hi all, >>> >>> I'm trying to generate graphs from my test results, with regions >>> coloured with succeeded and failing tests. It nearly works, but I have >>> the following problem. I am providing the data with fill_between, which >>> returns PolyCollection objects which cannot be provided to a legend. So >>> I use the "proxy artist" trick, as described here >>> >>> http://matplotlib.sourceforge.net/users/legend_guide.html#plotting-guide-legend >>> >> >> What about creating a proxy artist which is a simple polygon that has >> the same outline as your fill_between polygon? >> >> >> In [539]: t = np.arange(0, 1, 0.05) >> >> In [540]: y = np.sin(2*np.pi*t) >> >> In [541]: verts = zip(t, y) >> >> In [542]: proxy = mpatches.Polygon(verts, facecolor='yellow') >> >> The only reason fill_between uses a PolyCollection is to support the >> "where" keyword argument for non-contiguous fill regions, which you do >> not appear to be using. Thus you could simply create the polygon >> yourself with a little calculation (see mlab.poly_between for a helper >> function) and then just add that patch to the axes rather than using >> fill_between:: >> >> t = np.arange(0, 1, 0.05) >> ymin = np.sin(2*np.pi*t)-5 >> ymax = np.sin(2*np.pi*t)+5 >> xs, ys = mlab.poly_between(t, ymin, ymax) >> verts = zip(xs, ys) >> poly = mpatches.Polygon (verts, facecolor='red', label='my poly') >> ax = subplot(111) >> ax.add_patch(poly) >> ax.legend(loc='best') >> ax.axis([0, 1, -6, 6]) >> plt.draw() >> >> ------------------------------------------------------------------------------ >> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, >> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW >> http://p.sf.net/sfu/solaris-dev2dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: zxc <Web...@we...> - 2010-02-11 23:36:53
|
2 Problems: 1. How is it possible to maximize the window of the plot? 2. First I want to plot only figure 0, after 5 seconds figure 0 has to be closed and figure 1 to be shown. Any suggestions? from pylab import * import time ion() figure(0) plot([1,2,3]) figure(1) plot([10, 20, 30]) figure(0) plot([4, 5, 6]) figure(1) plot([40, 50, 60]) draw(0) time.sleep(5) close() draw(1) show() |
|
From: Wayne W. <sie...@sb...> - 2010-02-11 22:43:02
|
Well, here's an interesting twist on help, PUG, Python Users Groups. A world wide list is at <http://wiki.python.org/moin/LocalUserGroups>., The nearest one to me is near San Jose, CA about 180 miles from here, and meets the fourth Thursday of the month. Fortunately, I travel down there fairly often to visit friends and family. I think I'll mark my calendar. -- "Crime is way down. War is declining. And that's far from the good news." -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW |
|
From: C M <cmp...@gm...> - 2010-02-11 22:33:32
|
On Thu, Feb 11, 2010 at 12:40 PM, Filipe Pires Alvarenga Fernandes <oc...@gm...> wrote: > Hello list, > > For the following plotI using a large font for the tick-label that causes > the first x,y tick-labels to overlap > > http://yfrog.com/5zimageykp > > for now I'm padding spaces to "fix" the plot, like this: > > newtick = ["-10 ", "-5 ", "0 ", "5 ", "10 "] > pos =[-10, -5, 0, 5, 10] > yticks(pos, newtick) > > However I was wondering if there is any automatic way to avoid or fix this > overlap. > > Thanks, Filipe This is also not automatic, and maybe more work than it's worth, but could it be helpful to use spines, as shown in the example down the page a bit here: http://matplotlib.sourceforge.net/users/whats_new.html It seems there would be no way for the numbers to overlap if spines were used this way. Che |
|
From: ristretto <ris...@gm...> - 2010-02-11 22:24:05
|
> While developers are working hard to fix any bugs, Matplolib is not a > perfect, bug-free library. And I doubt if it ever will be (to > clarify, I'm one of the developers). > > And with the 0.99 maintenance branch and the current svn, I cannot > reproduce your problem, so I guess this is a known bug that has been > fixed already. > > -JJ > Hi, I hear you. I'm a developer too (not on matplotlib.) It's hard to keep it all together all the time, and keep everyone happy. I wish you the best. I'm using python-matplotlib 0.99.0-1ubuntu1 on Ubuntu 9.10 -- View this message in context: http://old.nabble.com/pyplot.yticks-ignoring-font-if-labels-are-supplied%2C-any-ideas--tp27553479p27555804.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Jae-Joon L. <lee...@gm...> - 2010-02-11 22:19:25
|
The current matplotlib does not have any automatic way as far as I know (any contribution will be appreciated). On the other hand, instead of explicitly specifying the ticks and ticklabels, you may try to reduce the number of ticks. gca().xaxis.get_major_locator()._nbins=4 Regards, -JJ On Thu, Feb 11, 2010 at 12:40 PM, Filipe Pires Alvarenga Fernandes <oc...@gm...> wrote: > Hello list, > > For the following plotI using a large font for the tick-label that causes > the first x,y tick-labels to overlap > > http://yfrog.com/5zimageykp > > for now I'm padding spaces to "fix" the plot, like this: > > newtick = ["-10 ", "-5 ", "0 ", "5 ", "10 "] > pos =[-10, -5, 0, 5, 10] > yticks(pos, newtick) > > However I was wondering if there is any automatic way to avoid or fix this > overlap. > > Thanks, Filipe > > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Jae-Joon L. <lee...@gm...> - 2010-02-11 22:12:11
|
On Thu, Feb 11, 2010 at 3:55 PM, ristretto <ris...@gm...> wrote: > I'm not sure I'll ever really understand Matplotlib. Why I had to do this, > I don't really know. It's hard to spec out projects when you think that > setting the font on some text should take no time at all, but it takes hours > due to stupid complexities. > While developers are working hard to fix any bugs, Matplolib is not a perfect, bug-free library. And I doubt if it ever will be (to clarify, I'm one of the developers). And with the 0.99 maintenance branch and the current svn, I cannot reproduce your problem, so I guess this is a known bug that has been fixed already. -JJ |
|
From: Ernest A. <ead...@gm...> - 2010-02-11 21:51:10
|
Hi, 11/02/10 @ 12:40 (-0500), thus spake Filipe Pires Alvarenga Fernandes: > Hello list, > > For the following plotI using a large font for the tick-label that causes > the first x,y tick-labels to overlap > > http://yfrog.com/5zimageykp > > for now I'm padding spaces to "fix" the plot, like this: > > newtick = ["-10 ", "-5 ", "0 ", "5 ", "10 "] > pos =[-10, -5, 0, 5, 10] > yticks(pos, newtick) > > However I was wondering if there is any automatic way to avoid or fix this > overlap. Not that I'm aware of, other than changing the font size, or the axis limits. > Thanks, Filipe > ------------------------------------------------------------------------------ > SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Bruce F. <br...@cl...> - 2010-02-11 21:24:20
|
In using the contour as in: contour(X,Y,Z,N) N is a number of automatically chosen levels. I would like to contour based on data divisions. For instance, perhaps I'd like to use a contour or color-fill (contourf) every 2 units. I'm not seeing how to accomplish this. Any points in the right direction would be appreciated. Thanks! Bruce --------------------------------------- Bruce W. Ford Clear Science, Inc. br...@cl... http://www.ClearScienceInc.com 8241 Parkridge Circle N. Jacksonville, FL 32211 Skype: bruce.w.ford Google Talk: fo...@gm... |
|
From: Jorge S. <jor...@ya...> - 2010-02-11 21:24:00
|
El 11/02/10 18:28, Jae-Joon Lee escribió: > You're already using "ax.legend", what kind of OO way do you want? > > Instead of calling plt.legend, you may do > ax.legend([s],[str(i)]) > Thanks Jae-Joon. You're right. I tried this before, but I must have done something wrong then, because when I tried the result were new legends stacked upon the old ones, which didn't look nice when the new legend was shorter than previous ones. > Or, if you know what you're doing, you can do > > leg = ax.legend([s],[''], loc=0) > > and in the for loop, > > leg.texts[0].set_text(str(i)) > This is even nicer. I tried something similar but somehow overlooked the texts[0] part, so it didn't work. I'll have to go back to the docs... Regards, Jorge |
|
From: ristretto <ris...@gm...> - 2010-02-11 20:55:08
|
ristretto wrote:
>
> import matplotlib.pyplot as pyplot
>
> fprop=matplotlib.font_manager.FontProperties(size='xx-small')
>
> pyplot.yticks((70,80,90,100),('70%','80%','90%','100%'),
> color="#8c949d",horizontalalignment='right',fontproperties=fprop )
>
> This will cause all the kwargs to be ignored, so the color, alignment and
> fonts are all at their default values.
>
> pyplot.yticks((70,80,90,100),color="#8c949d",horizontalalignment='right',fontproperties=fprop
> )
>
> this on, on the other hand, works fine.
>
> This is showing that when you provide labels for the ticks (second arg to
> yticks), the kwargs are ignored. Does anyone have any idea why this is
> the case?
>
I'm not sure I'll ever really understand Matplotlib. Why I had to do this,
I don't really know. It's hard to spec out projects when you think that
setting the font on some text should take no time at all, but it takes hours
due to stupid complexities.
Rant over, here's what I did
pyplot.yticks((70,80,90,100),
color="#8c949d",horizontalalignment='right',fontproperties=fprop2 )
ax.set_yticklabels(('70%','80%','90%','100%'),color="#8c949d",horizontalalignment='right')
The first line doesn't specify the labels, this works in that it puts 70 80
90 100 as labels, but with correct color and font.
The second line sets the label text, but not the font or color.
This seems to work.
--
View this message in context: http://old.nabble.com/pyplot.yticks-ignoring-font-if-labels-are-supplied%2C-any-ideas--tp27553479p27554596.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Chloe L. <ch...@be...> - 2010-02-11 20:40:29
|
How about returning the colorbar limits from pcl(), and using the
larger extent of those limits and the ones from the scatter data when
you call the colorbar in sct()? (ScalarMappables have get_clim(),
set_clim().)
Or, more generally, record the data limits and have both functions
check them, in case someday you want to call pcl() after sct().
In general, I like the figure style for an experiment or case to be a
class, with plotting functions like the ones you've already written
but data members that either pretty up the functions, or are useful
for other reports ('Variability and drift between runs'...), etc.
&C
On Feb 10, 2010, at 10 Feb, 9:41 AM, Bror Jonsson wrote:
>
> Dear all,
>
> This is probably a silly question based on my bias from matlab, but
> I have tried for two days without luck. I need to make pcolor plots
> in several figures, and the go back and add a scatter on each. This
> procedure is necessary due to how I read the data. My problem is
> that I can't figure out how update the colorbar in the end.
>
> An example is as follows:
>
> #=====
> import random
>
> import pylab as pl
> import numpy as np
>
> from numpy.random import rand
>
> def pcl(fig,val):
> pl.figure(fig)
> pl.clf()
> pl.pcolor(val)
> pl.colorbar()
>
> def sct(fig,xvec,yvec,cvec):
> pl.figure(fig)
> pl.scatter(xvec,yvec,40,cvec)
> pl.xlim(0,10)
> pl.ylim(0,10)
> pl.colorbar(orientation='horizontal')
>
> pcl(1, rand(20,20)*10)
> pcl(2, rand(20,20)*10)
> pcl(3, rand(20,20)*10)
>
> sct(1,rand(10)*10,rand(10)*10,rand(10)*40)
> sct(2,rand(10)*10,rand(10)*10,rand(10)*40)
> sct(3,rand(10)*10,rand(10)*10,rand(10)*40)
> #=====
>
> I would like the pcolor image and the colorbar to have the same clim
> extents as the scatter in the end. Is this in any way possible?
>
> Many thanks for any help!
>
> :-)Bror
>
>
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as
> DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Chloe Lewis
Graduate student, Amundson Lab
Ecosystem Sciences
137 Mulford Hall
Berkeley, CA 94720-3114
http://nature.berkeley.edu/~chlewis
|
|
From: ristretto <ris...@gm...> - 2010-02-11 20:13:39
|
import matplotlib.pyplot as pyplot
fprop=matplotlib.font_manager.FontProperties(size='xx-small')
pyplot.yticks((70,80,90,100),('70%','80%','90%','100%'),
color="#8c949d",horizontalalignment='right',fontproperties=fprop )
This will cause all the kwargs to be ignored, so the color, alignment and
fonts are all at their default values.
pyplot.yticks((70,80,90,100),color="#8c949d",horizontalalignment='right',fontproperties=fprop
)
this on, on the other hand, works fine.
This is showing that when you provide labels for the ticks (second arg to
yticks), the kwargs are ignored. Does anyone have any idea why this is the
case?
--
View this message in context: http://old.nabble.com/pyplot.yticks-ignoring-font-if-labels-are-supplied%2C-any-ideas--tp27553479p27553479.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Christopher B. <Chr...@no...> - 2010-02-11 19:15:28
|
Wayne Watson wrote: > The developer stated this in a msg this morning. > Either way should work. Double clicking the py file is probably more > convenient, but you can more easily see error messages if you open it > with IDLE option 3: Start it up in a command window (DOS box on Windows), and then you won't have the mainloop interaction issues, and you'll see the output. open a dos box, cd to the directory where your script is, and type: python name_of_script. If it can't find python, then you need to tell it where to look by adding it to your PATH or typing the whole thing: C:\Python25\bin\python.exe or something like that (not on Windows at the moment) Note that this is not an MPL issue it is an IDLE (and many other IDEs) issue -- any Python IDE that runs your code in the same process as the IDE itself is going to have these issues. IPython has gone to great pains to make interactive use with GUI programs work -- I don't any other tool that has. Wayne Watson wrote: > That link has no reference to tkinter. tk and tk2, plus a few others > with tk in their names, but nothing else.A search in the box produced > nothing. tkinter is the python binding to the Tk GUI toolkit -- so tkiniter and tk mean about the same thing when talking about Python. Wayne Watson wrote: > Thanks for the info. I'm semi-resistant to ipython. I tried if for a few > hours, and it seemed a bit too much like linux. ipython is an interactive command line interface to Python -- it is much nicer than the raw interpreter, but it is what it is, and it is very good at it. It can be very helpful to experiment with stuff in an interactive environment, but once you go beyond tiny stuff, you need to write a program. To do that you need an editor, and a wya to run and debug it. An IDE integrates these functions, and there are many of them. Personally, I use an editor to edit the code, the commend line (or IPython) to run the code, and do most of my debugging with print statements. I suggest you take a bit of a break from the problem at hand, and go through a couple intro tutoroal sit python, write a couple small programs (tkinter-based, if that's what you're going to need), and get a handle on how to do it. > lot, and enjoyed it. I'll consider it. Windows is the game now. frankly, not all that different from a programming in Python point of view. > Yes, actual use is good, but the needed imports seem a bit baffling. > scipy, pylab, matplotlib, ...? What components do I only need for a > particular use? you need what you need -- you need numpy for amost eveything you'll ever do if you work with numbers. You need matplotlib if you need to plot, you need scipy if you need any of the more complicated numerical routines it provides. pyplot dumps a bunch of these into the same namespace, which is nice for interactive use, but I"d stay away from it for writing programs. Wayne Watson wrote: > I'm assuming that I don't > want to use import matplotlib a lot, but something selectively like from > matplotlib.image import AxesImage, or from matplotlib.plot import > figure, show. What did I miss in my Python upbringing? It's really a matter of taste. YOu either do: import matplotlib fig = matplotlib.figure or from matplotlib import figure fig = figure. You'll need a lot of things in matplotlib if you're doing much of anything, and "namespaces are one honking great idea", so I do: import matplotlib as mpl fig = mpl.figure() etc.. HTH, -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
|
From: Joseph D C. <ca...@au...> - 2010-02-11 19:05:05
|
I am encountering the following error:
python -c 'import pylab; pylab.clf(); pylab.plot(pylab.sin(range(101)));
pylab.xlabel("Test X"); pylab.ylabel("Test Y"); pylab.show()'
/local_home/calijos/usr/lib/python2.6/site-packages/matplotlib/backends/backend_gtk.py:621: DeprecationWarning: Use the new widget gtk.Tooltip
self.tooltips = gtk.Tooltips()
Segmentation fault
-------------------------------------------------------------
But when I run the following command, I encounter no errors and plot is
as expected:
python -c 'import pylab; pylab.clf(); pylab.plot(pylab.sin(range(100)));
pylab.xlabel("Test X"); pylab.ylabel("Test Y"); pylab.show()'
I tried several other plots, any plots with less than 100 points work
correctly, any plots with more than 100 points segfault.
-------------------------------------------------------------
My current system setup is:
System: Ubuntu 9.04 x64
Python: Python 2.6.2
Matplotlib: >0.99.1 (tied 0.99.1.1, 0.99.1.2, and latest SVN version:
8126)
Numpy Version: 1.5.0.dev8106
I have been a long time Matplotlib user, and have never encountered this
issue. It started whenever I updated numpy and scipy. However,
reverting to the old version does not seem to fix the situation. I also
cannot get numpy to crash on its own. All my software works when
plotting is disabled.
Has anyone else experienced this or similar problems during an upgrade?
Joe
|
|
From: Alan G I. <ala...@gm...> - 2010-02-11 18:56:09
|
On 2/11/2010 1:24 PM, Wayne Watson wrote:
> Suppose I want to produce a scatter, contour, or 3d
> plot. What do I need minimally or more widely?
If you just want to work on these in isolation,
you just need
import matplotlib.pyplot as plt
Nothing more. You can now use e.g. plt.plot
whenever you want.
http://matplotlib.sourceforge.net/users/pyplot_tutorial.html
But if you want to embed Matplotlib in a GUI
(for example, to make a Tkinter application),
you will have to learn some additional details.
GUI is best learned by modifying examples,
and Matplotlib provides *many* examples.
Here are a few extra hints:
http://econpy.googlecode.com/svn/trunk/software4econ.xhtml#mpl_hints
Alan Isaac
|
|
From: Philipp B. <li...@ro...> - 2010-02-11 18:52:45
|
Hi, > For newbies to MPL, needed imports seem a bit baffling. scipy, pylab, > matplotlib, ...? What libs or lib components do I only need for a > particular use? Suppose I want to produce a scatter, contour, or 3d Like you said: Depends on the particular use. How to give a universal answer? Matplotlib does very much for you, but you still need to use your head a little bit. Nobody forces you to "from pylab import *" if a "from pylab import linspace" was enough. So take a look at you code, that should be enough. If you are still not satisfied maybe you try to search for "python unused imports", maybe you find a profiler or something like that that helps you. In addition, reading the documentation text to the functions (with ?func or help func in ipython) helps to find out where the modules come from if you did excessive importing jobs before. |
|
From: Alan G I. <ala...@gm...> - 2010-02-11 18:31:09
|
On 2/11/2010 11:42 AM, Wayne Watson wrote: > That link has no reference to tkinter http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_tk.html Read down a half dozen lines or so. Alan Isaac |
|
From: Wayne W. <sie...@sb...> - 2010-02-11 18:31:04
|
For newbies to MPL, needed imports seem a bit baffling. scipy, pylab, matplotlib, ...? What libs or lib components do I only need for a particular use? Suppose I want to produce a scatter, contour, or 3d plot. What do I need minimally or more widely? I'm assuming that I don't want to use import matplotlib a lot, but something selectively like from matplotlib.image import AxesImage, or from matplotlib.plot import figure, show. What did I miss in my Python upbringing? -- "Crime is way down. War is declining. And that's far from the good news." -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW |