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: 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 |
|
From: Alan G I. <ala...@gm...> - 2010-02-11 18:29:14
|
On 2/11/2010 11:36 AM, Wayne Watson wrote: > you can more easily see error messages if you open it with IDLE Why? Just call it from the command line of a console window that you will leave open. (Or write the error to file.) Alan Isaac |
|
From: Wayne W. <sie...@sb...> - 2010-02-11 18:06:29
|
Thanks. Got detoured by "not supported". I think I'll be printing our your messages in the future. I just went back to one just now, and had forgotten about your mentio of pyLab, model. On 2/11/2010 7:38 AM, John Hunter wrote: > On Thu, Feb 11, 2010 at 9:18 AM, Wayne Watson > <sie...@sb...> wrote: > >> Yes, certainly,as you explained a few days ago, the present use is >> incompatible with idle usage. Further, you mentioned the need for ipython >> and the "backend" to make it work (in IDLE?). The way we are using problem >> seems a bit ambiguous, so let me tell what I want the application to do. >> > > From the screenshots, this appears to be a tk app that is being run > from idle. If you are trying to integrate pyplot with this, it is a > mode of usage that is *explicitly not supported*. Rather, you should > embed matplotlib in the app following the embedding_in_tk*.py examples > at > > http://matplotlib.sourceforge.net/examples/user_interfaces/index.html > > JDH > > -- "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: Jae-Joon L. <lee...@gm...> - 2010-02-11 17:45:25
|
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 > |
|
From: Filipe P. A. F. <oc...@gm...> - 2010-02-11 17:40:42
|
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 |
|
From: Tomasz K. <t.k...@ci...> - 2010-02-11 17:38:16
|
I figured now that this was the bottom zero, hence I used other value instead. But here we are - there is a conceptual problem with stacked bar plots in the log scale - the stacked areas lose their proportions and are no longer illustrative. On 11 Feb 2010, at 17:06, <PH...@Ge...> <PH...@Ge...> wrote: >> -----Original Message----- >> From: Tomasz Koziara [mailto:t.k...@ci...] >> Hi >> >> I am having a trouble with making a bar plot with log scale enabled. >> When setting simply log=True in the bar () command, all bars have >> junk >> values of kind 1E-100. When using semilogy () on the other hand, not >> all stacked bar elements get drawn, plus what is being drawn starts >> "in the air" above the zero level (attached two eps files). >> >> I must be doing the wrong thing, I suppose. > > Are you specifying the "bottom" keyword argument? > -paul h |
|
From: D2Hitman <j.m...@wa...> - 2010-02-11 17:38:04
|
Hi, I was hoping to use mplot3d to visually examine the density of points in a 3D plot. However, the number of points i am displaying is of the order 10,000-100,000. I use scatter or scatter3D to plot x,y,z for the points. The pan and zoom functions become unworkable. Does anyone have any bright ideas as to how i could get round this problem? In 2D, i would use histogram2D and either contour or pcolor to show densities. Could something similar be done in 3D too? Thanks, Jon. -- View this message in context: http://old.nabble.com/mplot3d%3A-large-numbers-scatter-plot-tp27551324p27551324.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Jae-Joon L. <lee...@gm...> - 2010-02-11 17:29:21
|
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)]) 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)) Regards, -JJ On Thu, Feb 11, 2010 at 5:56 AM, Jorge Scandaliaris <jor...@ya...> wrote: > Hi, > I am re-using a scatter plot in the same figure for interactively displaying > results without ending up with 30 windows open. The legend is relevant, and so > it must be also updated. So far the only way I found was to use the set_label() > method and then using plt.legend(). Is this the only way to get a legend updated > from a label? I am curious, since generally there is the pyplot way and a more > OO way of achieving things, but I could't find it this time. > > The snippet below shows what I am using right now: > > import numpy as np > import scipy as sp > import matplotlib as mpl > import matplotlib.pyplot as plt > > data = np.random.randn(3,10) > fig = plt.figure() > ax = fig.add_subplot(111) > s, = ax.plot([]) > ax.axis([0,10,-1,1]) > ax.legend([s],[''], loc=0) > for i in range(data.shape[0]): > s.set_data([np.arange(data.shape[1]),data[i]]) > s.set_label(str(i)) > plt.legend() > plt.draw() > plt.ginput(timeout=0) > > > > ------------------------------------------------------------------------------ > 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 > |