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

Showing 8 results of 8

From: Tommy G. <tg...@ma...> - 2007年06月20日 19:41:02
I have a problem where I need to quickly inspect 20-30 plots. I want 
to open a
plotting window, plot the first plot, then hit return to see the nest 
plot appear
in the same window.
Below is my script, but it creates a window that has to be closed 
before it
loops over the rest of the plots. How can I avoid that the first plot 
has to
be closed "manually"?
Cheers
 Tommy
Note: I know confirm() is overkill, but I just ripped it out of a 
different program
to quickly put this script together :)
import pylab
from optparse import OptionParser
parser = OptionParser(version="%prog 0.01a")
parser.add_option("-i","--infile", dest="infname", action="store",
 help="The input file", metavar="INFILE")
parser.add_option("-n","--num", dest="n", action="store",type="int",
 help="number of files", metavar="N")
(options,args) = parser.parse_args()
def confirm(_prompt=None, _default=False):
 """prompts for yes or no response. Return True for yes and False 
for no."""
 promptstr = _prompt
 if (not promptstr):
 promptstr = "Confirm"
 if (_default):
 prompt = "%s [%s]|%s: " % (promptstr, "y", "n")
 else:
 prompt = "%s [%s]|%s: " % (promptstr, "n", "y")
 while (True):
 ans = raw_input(prompt)
 if (not ans):
 return _default
 if ((ans != "y") and (ans != "Y") and (ans != "n") and (ans ! 
= "N")):
 print "please enter again y or n."
 continue
 if ((ans == "y") or (ans == "Y")):
 return True
 if ((ans == "n") or (ans == "N")):
 return False
pylab.figure(figsize=(12,14))
for i in xrange(1,options.n+1):
 t_list = []
 a_list = []
 e_list = []
 i_list = []
 q_list = []
 Q_list = []
 fname = "%s%02i.aei" % (options.infname,i)
 print fname
 all_lines = open(fname,"r").readlines()
 n=0
 for lines in all_lines:
 if n > 3:
 t_in,a_in,e_in,i_in,peri_in,node_in,M_in,mass = 
lines.split()
 t_list.append(float(t_in))
 a_list.append(float(a_in))
 e_list.append(float(e_in))
 i_list.append(float(i_in))
 q_list.append(float(float(a_in)*(1. - float(e_in))))
 Q_list.append(float(float(a_in)*(1. + float(e_in))))
 n+=1
 pylab.clf()
 pylab.subplot(321)
 pylab.plot(t_list,a_list,'r-')
 pylab.plot(t_list,Q_list,'b-')
 pylab.plot(t_list,q_list,'g-')
 pylab.subplot(322)
 pylab.plot(t_list,a_list,'r-')
 pylab.subplot(323)
 pylab.plot(t_list,Q_list,'b-')
 pylab.subplot(324)
 pylab.plot(t_list,q_list,'g-')
 pylab.subplot(325)
 pylab.plot(t_list,e_list,'r-')
 pylab.subplot(326)
 pylab.plot(t_list,i_list,'r-')
# if i == 1: pylab.show()
 end = confirm("Finished?")
From: Eric F. <ef...@ha...> - 2007年06月20日 16:37:32
Unfortunately, the 3D plotting capability is incomplete and mostly 
unmaintained.
Eric
Orest Kozyar wrote:
> I just discovered the 3D plotting functions that matplotlib offers
> (i.e. Axes3D with plot_surface, etc). This is a great package, but I
> have not been able to find documentation for some parameters. For
> example, the plot_surface function appears to take the following
> arguments:
> (X, Y, Z, *args, **kwargs)
> 
> x,y, and z are pretty much self-explanatory, but how do I find out
> what arguments can be passed to *args and **kwargs? There's no
> docstring available for these functions.
> 
> One thing I would really love to be able to do is generate a surface
> map that is color-coded. Right now I can generate a single-color
> surface map, but a color-coded surface map would be much easier to
> interpret.
> 
> Thanks!
> Orest
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Benoit D. <ben...@uc...> - 2007年06月20日 16:31:05
Hey,
> I would love to be able to plot them next to each
> other as it should be (like this basically:
> http://img75.imageshack.us/img75/6218/distthreeef4.jpg )
This is quite easy...
You should do sth like:
width=3D0.5
position =3D 0.25
bar(xAxis-position, yAxis, width, color=3D'#BBBBBB')
width defines the width of the bar. And position allows you to move =20
the bar along the x-axis ticks (by addition or substracting position =20
to you x-axis vector)
Benoit
> Anyone has some suggestion?
>
> Thanks!
> Giorgio
>
> ----------------------------------------------------------------------=20=
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Dr. Benoit Donnet
Universit=E9 Catholique de Louvain (UCL)
Facult=E9 des Sciences Appliqu=E9es - D=E9partement d'Ing=E9nierie =20
Informatique (INGI)
Place Sainte Barbe, 2
1348 Louvain-la-Neuve
Belgium
Phone: +32 10 47 87 18
Home page: http://inl.info.ucl.ac.be/donnet
From: Giorgio F. G. <gi...@gi...> - 2007年06月20日 16:02:45
Hi there,
I am trying to find a way to improve the plotting of a distribution.
I am using the boxplot command and the dist command to plot the spread
of a distribution: see first two panel here:
http://img75.imageshack.us/img75/5260/distonevy0.png
Now, whenever I add data to be plot on the hold axes I face two
problems that I don't really know how to solve ( see:
http://img232.imageshack.us/img232/2219/disttwopl2.png )
The first one is that I don't manage to get the upper boxplot to be
drawn using different colors.
The second is that the bars representing the distribution (middle
panel) are drawn one in front of the others, hiding in this way the
ones in the back. I would love to be able to plot them next to each
other as it should be (like this basically:
http://img75.imageshack.us/img75/6218/distthreeef4.jpg )
Anyone has some suggestion?
Thanks!
Giorgio
From: Orest K. <ore...@gm...> - 2007年06月20日 15:39:24
I just discovered the 3D plotting functions that matplotlib offers
(i.e. Axes3D with plot_surface, etc). This is a great package, but I
have not been able to find documentation for some parameters. For
example, the plot_surface function appears to take the following
arguments:
(X, Y, Z, *args, **kwargs)
x,y, and z are pretty much self-explanatory, but how do I find out
what arguments can be passed to *args and **kwargs? There's no
docstring available for these functions.
One thing I would really love to be able to do is generate a surface
map that is color-coded. Right now I can generate a single-color
surface map, but a color-coded surface map would be much easier to
interpret.
Thanks!
Orest
From: Antonino I. <tri...@gm...> - 2007年06月20日 11:01:52
Hi,
2007年6月19日, John Hunter <jd...@gm...>:
<snip>
> * you may want to look at the line editor dialog in backend_gtk.py for
> inspiration. This uses drop down menus for linestyles, color dialog
> boxes to pick colors, etc... I'll paste in the code below
>
> Thanks,
> JDH
>
> class DialogLineprops:
Just for the record, I had to explicitly import gtk.glade and to put a
self.show() call in the __init__() method to make this work.
Nice example though. Thanks :).
Regards,
 ~ Antonio
From: Antonino I. <tri...@gm...> - 2007年06月20日 09:36:12
Hi,
2007年6月19日, Antoine Sirinelli <mat...@mo...>:
> On Tue, Jun 19, 2007 at 02:12:28PM +0200, David Tremouilles wrote:
> > Pyplotsuite is another pygtk project using matplotlib.
> > It is developed by Antonino Ingargiola.
> > http://pyplotsuite.sourceforge.net/
> > Could be maybe interesting to join the effort on providing nice pygtk
> > tools for matplotlib sharing common elements of this two projects.
> > Just a suggestion...
>
> Interesting project. Thanks for the link, I didn't know this project.
Because has not been announced anywhere yet :D.
Antoine, I like the idea of your script. I really would like to see a
such thing included in matplotlib eventually. It would help either to quick
modify *all* the plot parameters and to have an immediate visual
representation of the matplotlib hierarchies. So would help both
matplotlib
script's users and (matplotlib) programmers as well.
As suggestion I think would be useful to divide the properties in three
groups: free text, number and list and use for each of then a text entry, a
spin button or a combo box. Don't be offended if this is obvious to you :).
I've implemented a somewhat similar dialog for Plotfile2 (one of the
two scripts composing PyPlotSuite). My dialog although "similar" is
more limited
in scope. If you are interested you can see the dialog class here (line
566):
http://repo.or.cz/w/pyplotsuite.git?a=blob;f=plotfile2.py;h=aa089c3e09957d36396e4f3b97fbfb38d58c44de;hb=HEAD
and a screenshot to see how it looks like:
http://pyplotsuite.sourceforge.net/images/plotfile2-screenshot2.png
I will use your implementation and John Hunter's DialogLineprops as
source of inspiration. Thanks...
> > I'm very pleased to see there is an active and growing community using
> > matplotlib together with pygtk.
>
> I am using pygtk and matplotlib in my work for building interfaces to
> data analysis programs (numpy, scipy and C).
I've do this for my own purpose. After a while I decided to publish
some of my scripts so PyPlotSuite was born. The purpose is to allow
the user to visualize/analyze data without knowing python or
matplotlib. Ideally my scripts would be associated to specific file
types so that the file manager opens the data with the correct
"visualizer" (at least this is how I use them).
I'm open in any kind of collaboration, in both senses. I'm just a bit
limited in time ATM.
Regards,
 ~ Antonio
From: tocer <toc...@gm...> - 2007年06月20日 03:54:11
Thank your reply. It seems to be helpful for me.
John Hunter wrote::
> On 6/19/07, tocer <toc...@gm...> wrote:
>> I have a project coding with Delphi+p4d, and I wish embeded pylab in 
>> it, but I
>> don't know how to do it.
>>
>> Any suggestion is appreciate.
> 
> You should follow the lead of one of the *Agg backends, eg
> backend_qtagg4.py. The basic approach is to use some GUI library for
> window management, buttons, etc, and use the matplotlib Agg rendering
> library to create your image. That way you don't have to worry about
> any of the GUI drawing functions, and can just transfer the Agg canvas
> into the GUI canvas via a pixel buffer transfer.
> 
> See lib/matplotlib/backends/backend_template.py for more info -- if
> you use the approach suggested above, you will not need to implemented
> the renderer or graphics context classes, only the figure canvas and
> manager.
> 
> JDH
> 
1 message has been excluded from this view by a project administrator.

Showing 8 results of 8

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 によって変換されたページ (->オリジナル) /