SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

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
(7)
2
3
4
(1)
5
6
(3)
7
(1)
8
(5)
9
(15)
10
(15)
11
(6)
12
(7)
13
14
(3)
15
(10)
16
(11)
17
(17)
18
(4)
19
(6)
20
21
(1)
22
(5)
23
(4)
24
25
26
(7)
27
(2)
28
(4)
29
(9)
30
(11)




Showing 11 results of 11

I noticed when I pass the mouse pointer over
a point on a graph that the (X, Y) values are
displayed. This is *great*.
What if I wanted to customize/extend what gets
printed in response to mouse pointer position?
Is this possible?
e.g. If you had say 5 graphs on one plot, could you
display all "Y values" for every X value??
(X, Y1, Y2, Y3, Y4, Y5)??
Chris
--
_______________________________________
Christian Seberino, Ph.D.
SPAWAR Systems Center San Diego
Code 2872
49258 Mills Street, Room 158
San Diego, CA 92152-5385
U.S.A.
Phone: (619) 553-9973
Fax : (619) 553-6521
Email: seb...@sp...
_______________________________________
From: Perry G. <pe...@st...> - 2004年11月30日 22:06:15
Yesterday I brought up some user interface issues with John. He agreed 
that these generally ought to be discussed in a broader forum (meaning 
he wasn't dead set against them; at least not most of them). So here 
were some of the thoughts that I raised that pertain mainly to 
generating plots during interactive analysis sessions:
1) Seems to me that repr for the plot objects could be blanked out for 
interactive mode. Having python print out what it does now isn't 
usually useful and in some cases (like error bars) leads to a dump on 
the screen. Any reason not to make repr mode dependent (or at least 
configurable)?
John pointed out that one of the worst offenders (error bars) actually 
return lists of plot objects so it wouldn't do much good to override 
repr for the plot objects unless one used a list object where repr was 
overridden as well. The annoyance factor in interactive use is perhaps 
sufficient to do this though. What do others think?
2) Any support for being able to specify colors using more than single 
character codes (say, using "red" or "green", and line styles and 
symbols with more descriptive terms like "dashed". This is not in place 
of the existing scheme, but as a more verbose alternative. Along those 
lines, allowing something like:
plot(x1, y1, x2, y2, x3, y3, color=['red','green','blue'])
3) Tick control can be awkward if one simply wants to add an integral 
number of minor ticks to the chosen major tick interval. Currently 
using minor ticks forces one to access the plot objects, and specify 
the major tick interval as well. It would be nice if one could just ask 
for n minor ticks for each major tick interval by using the appropriate 
keyword (name tbd). Some illustrations of possible alternatives:
plot(x, y, xmajor=5)
plot(x, y, xmajor=5, xminor=1)
plot(x, y, xminordiv=5) # 5 minor ticks per major regardless of major 
tick size
Generally, I expect that people set these interactively after plotting 
without these options. When they see what is automatically produced, 
this is a simple way of tweaking the plot without doing a lot of object 
manipulation.
4) The current means of doing overplotting is modal and confusing to 
many used to IDL's approach. It is easy to forget what the current mode 
is. IDL uses different commands (e.g., oplot vs plot) to overplot. Some 
alternatives John and I mentioned:
a) generate 'o' versions of all plot functions (oplot, oimplot, etc.). 
Easy to do but clutters the namespace.
b) have an 'over' function to apply to all such commands: over(plot, x, 
y, color='g')
c) use a keyword argument to only apply to the function call:
plot(x, y, hold=True) # doesn't change the hold state after completion, 
but does overplot
I'm happy to have c) myself.
5) For many customizations plot objects must be manipulated directly. 
I'm wondering if this is a problem or not (I suspect that it is for a 
reasonably large class of user). In particular I'm worried that the 
leap to the object view is sufficiently high enough that many less
sophisticated users will find that an off-putting hurdle. How does 
matlab handle these sorts of customizations? The same way matplotlib 
does? If so then I suppose my worries are unfounded. Keeping a lot of 
the customization exposed within a purely functional interface means
adding more functions or keywords which is its own problem. To be more 
specific, how minor ticking is handled is a good example of making the 
keyword interface richer and avoiding object manipulations for common 
customizations:
plot(x, y, xminordiv=4)
vs
plot(x, y)
ax = gca()
ax.xaxis.set_major_locator(MultipleLocator(20))
ax.xaxis.set_minor_locator(MultipleLocator(5))
# update
The same could be said for specifying different kinds of tickers
6) If one does these object manipulations the display is not updated. 
One of John's list postings suggests resizing or calling the draw 
method. The first is often unacceptable, and the second isn't quite so 
obvious (since it requires specifying a renderer). Perhaps a simple 
function to do the update that doesn't start a mainloop (as show does) 
is needed. John responded:
>
> This is a problem. I think the solution may be to override setattr in
> the artist base class to call draw_if_interactive. The matlab
> interface could add this method at module load time so as to not break
> the interface separation between the OO layer and the matlab layer.
> I'll have to look into it.
(could it be as simple as defining update() to get the current renderer 
and then call gcf().draw(currentrenderer)?)
It's possible that there are two or more different kinds of functional 
interfaces and philosophy such that there should be different modules 
to satisfy the different camps. But both John and I thought that if at 
all possible, these sorts of issues should be accommodated within one 
module. That the matlab (soon to be pylab) shouldn't necessarily be a 
strict matlab clone in interface but also take some of the better ideas 
from other packages. Any comments on the above suggestions?
Perry Greenfield
From: Wendell C. <wcr...@uf...> - 2004年11月30日 21:29:24
Thanks very much. Setting clim(0.0, 1.0) inside the loop stabilized the
color mapping.
Wendell Cropper
At 02:58 PM 11/30/2004 -0600, John Hunter wrote:
>>>>>> "Wendell" == Wendell Cropper <wcr...@uf...> writes:
>
> Wendell> I have been trying to use pcolor() to display a grid with
> Wendell> discrete values (1-4) that are changing over time. I'm
> Wendell> generating a series of saved figures that also include a
> Wendell> line graph of the sums of the 4 categories. The problem
> Wendell> is that that mapping of numbers to colors isn't constant
> Wendell> for the pcolor output. I changed the array from Float32
> Wendell> (used out of habit) to integer and got the same type of
> Wendell> result. It would also be nice to be able to use the same
> Wendell> color mapping for both sub plots.
>
> Wendell> I think (guess) that cmap=cm.jet controls the color
> Wendell> scheme, but it isn't clear to me how to change that, what
> Wendell> format it has, or why it seems to change with repeated
> Wendell> calls to pcolor() inside the program.
>
>It sounds to me like the color limits are being autoscaled with each
>call to pcolor. cm.jet does define the color map, but the color
>limits define the range of your data that correspond to the min and
>max of the colormap.
>
>See help(clim)
>
>If after each call to pcolor, you manually set the clim, you should
>have no problems.
>
>JDH
>
>
>
> Wendell> -------------------------------------------------------
> Wendell> SF email is sponsored by - The IT Product Guide Read
> Wendell> honest & candid reviews on hundreds of IT Products from
> Wendell> real users. Discover which products truly live up to the
> Wendell> hype. Start reading now.
> Wendell> http://productguide.itmanagersjournal.com/
> Wendell> _______________________________________________
> Wendell> Matplotlib-users mailing list
> Wendell> Mat...@li...
> Wendell> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
University of Florida
School of Forest Resources and Conservation
214 Newins-Ziegler
PO Box 110410
Gainesville, FL 32611-0410
352-846-0859 phone
352-392-1707 fax
wcr...@uf...
From: John H. <jdh...@ac...> - 2004年11月30日 21:00:03
>>>>> "Wendell" == Wendell Cropper <wcr...@uf...> writes:
 Wendell> I have been trying to use pcolor() to display a grid with
 Wendell> discrete values (1-4) that are changing over time. I'm
 Wendell> generating a series of saved figures that also include a
 Wendell> line graph of the sums of the 4 categories. The problem
 Wendell> is that that mapping of numbers to colors isn't constant
 Wendell> for the pcolor output. I changed the array from Float32
 Wendell> (used out of habit) to integer and got the same type of
 Wendell> result. It would also be nice to be able to use the same
 Wendell> color mapping for both sub plots.
 Wendell> I think (guess) that cmap=cm.jet controls the color
 Wendell> scheme, but it isn't clear to me how to change that, what
 Wendell> format it has, or why it seems to change with repeated
 Wendell> calls to pcolor() inside the program.
It sounds to me like the color limits are being autoscaled with each
call to pcolor. cm.jet does define the color map, but the color
limits define the range of your data that correspond to the min and
max of the colormap.
See help(clim)
If after each call to pcolor, you manually set the clim, you should
have no problems.
JDH
 Wendell> -------------------------------------------------------
 Wendell> SF email is sponsored by - The IT Product Guide Read
 Wendell> honest & candid reviews on hundreds of IT Products from
 Wendell> real users. Discover which products truly live up to the
 Wendell> hype. Start reading now.
 Wendell> http://productguide.itmanagersjournal.com/
 Wendell> _______________________________________________
 Wendell> Matplotlib-users mailing list
 Wendell> Mat...@li...
 Wendell> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: John H. <jdh...@ac...> - 2004年11月30日 20:57:36
>>>>> "Nicolas" == Nicolas Gruel <hu...@ya...> writes:
 Nicolas> Hello, I have some question on the legend.
 Nicolas> the first is perhaps a bug:
 Nicolas> I was trying something like:
 Nicolas> plot([1,2,3],[2,3,4],label='toto') legend()
 Nicolas> I can't obtain a legend, instead I have an error
 Nicolas> message. So perhaps I didn't understand at all the
 Nicolas> message I obtain with: help(legend) (it's possible with
 Nicolas> my poor english :) ) or there are a problem.
Yep, it's a bug. Replace the indicate line from axes.py
 loc = kwargs.gry('loc', 1)
 
with 
 loc = kwargs.get('loc', 1)
 ^^^
Note to self: run pychecker more often.
 Nicolas> second things: I would like to have the box create by the
 Nicolas> legend commande behind my plot and not above because it
 Nicolas> hide some of the point. Perhaps another solution is to
 Nicolas> put the box bacground in "alpha mode" but I don't know
 Nicolas> how to do this.
http://sourceforge.net/mailarchive/forum.php?thread_id=6039503&forum_id=33405
JDH
From: Chris B. <Chr...@no...> - 2004年11月30日 18:58:15
Jon Peirce wrote:
> Actually, since it's the package that most users probably actually want, 
most, maybe, but not all.
> would it be more suitable to move matplotlib.matlab into matplotlib 
> itself? Then we could simply
> 
> import matplotlib
please don't' do that. I haven't done much with it yet, but I'm much 
more interested in using the pythonesque api than the matlabesque one. 
I'm not using Matlab for a reason.
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
 		
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Nicolas G. <hu...@ya...> - 2004年11月30日 17:48:53
Hello, 
I have some question on the legend.
the first is perhaps a bug:
I was trying something like:
plot([1,2,3],[2,3,4],label='toto')
legend()
I can't obtain a legend, instead I have an error
message. So perhaps I didn't understand at all the
message I obtain with: help(legend) (it's possible
with my poor english :) ) or there are a problem.
second things:
I would like to have the box create by the legend
commande behind my plot and not above because it hide
some of the point. Perhaps another solution is to put
the box bacground in "alpha mode" but I don't know how
to do this. 
I will appreciate a lot your help, thanks.
Nicolas
	
	
		
Vous manquez d’espace pour stocker vos mails ? 
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com
From: Wendell C. <wcr...@uf...> - 2004年11月30日 13:16:29
I have been trying to use pcolor() to display a grid with discrete values
(1-4) that are changing over time. I'm generating a series of saved figures
that also include a line graph of the sums of the 4 categories. The
problem is that that mapping of numbers to colors isn't constant for the
pcolor output. I changed the array from Float32 (used out of habit) to
integer and got the same type of result. It would also be nice to be able
to use the same color mapping for both sub plots. 
I think (guess) that cmap=cm.jet controls the color scheme, but it isn't
clear to me how to change that, what format it has, or why it seems to
change with repeated calls to pcolor() inside the program.
Thanks,
Wendell Cropper
University of Florida
School of Forest Resources and Conservation
214 Newins-Ziegler
PO Box 110410
Gainesville, FL 32611-0410
352-846-0859 phone
352-392-1707 fax
wcr...@uf...
From: Darren D. <dd...@co...> - 2004年11月30日 10:09:06
> Actually, since it's the package that most users probably actually want,
> would it be more suitable to move matplotlib.matlab into matplotlib
> itself? Then we could simply
>
> import matplotlib
>
> Obviously that would mix the main user routines (plot()...) with the
> more administrative namespace (get_backend(), is_interactive()...) and
> maybe you'd want to move those into a separate (always imported)
> subpackage along the lines of matplotlib.res?
>
> Just an idea.
> Jon
>
That would introduce some problems if the user wanted to change rc settings, 
which currently has to be done before importing matplotlib.matlab.
-- 
Darren
From: Jon P. <Jon...@no...> - 2004年11月30日 10:01:18
Actually, since it's the package that most users probably actually want, 
would it be more suitable to move matplotlib.matlab into matplotlib 
itself? Then we could simply
import matplotlib
Obviously that would mix the main user routines (plot()...) with the 
more administrative namespace (get_backend(), is_interactive()...) and 
maybe you'd want to move those into a separate (always imported) 
subpackage along the lines of matplotlib.res?
Just an idea.
Jon
>To: mat...@li...
>From: John Hunter <jdh...@ac...>
>Date: 2004年11月29日 17:23:04 -0600
>Subject: [Matplotlib-users] matlab (TM)
>
>
>I'm concerned that at some point down the road, The Mathworks may not
>like the fact that matplotlib uses the name matlab, which is
>trademarked. I think I'll rename the matlab interface to pylab. In
>some sense, this name is more appropriate any way, because I'd like to
>incorporate the best features of IDL, gnuplot and python, while still
>retaining and enhancing core matlab compatibility. I emailed Travis,
>who previously used pylab.sf.net before it became part of scipy, and
>he didn't have a problem with our using this name. And Fernando
>already uses pylab as the option to ipython to make ipython support
>matplotlib.
>
>So my plan is to change the name of the matplotlib.matlab module to
>matplotlib.pylab, but wanted propose this here first since this will
>effect almost every script. It should be an easy search and replace
>operation, and I'll probably post a little python script to
>recursively replace all matplotlib.matlab references in a given
>directory with matplotlib.pylab, since I have a few directories myself
>that will need to be renamed.
>
>Comments or objections welcome.
>
>JDH
>
-- 
Jon Peirce
http://www.psychology.nottingham.ac.uk/staff/jwp/
This message has been scanned but we cannot guarantee that it and any
attachments are free from viruses or other damaging content: you are
advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
From: Stephen W. <ste...@cs...> - 2004年11月30日 05:45:03
On Mon, 2004年11月29日 at 17:23 -0600, John Hunter wrote:
> Comments or objections welcome.
The rename sounds fine to me, John. I've been using "ipython -pylab"
since SciPy '04 anyway :-)
-- 
Stephen Walton <ste...@cs...>
Physics & Astronomy CSUN

Showing 11 results of 11

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /