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

Showing 8 results of 8

From: John H. <jdh...@ac...> - 2004年01月22日 21:54:30
>>>>> "Engelsma," == Engelsma, Dave <D.E...@La...> writes:
 Engelsma,> Why are the x-axis limits adjusted when I try to plot a
 Engelsma,> vertical line as a Control Limit?
Everytime you add some data to the plot, matplotlib recomputes the
axis limits. The quick fix for you is to set your xlim after all the
plot commands
 # the histogram of the data
 n, bins, patches = matplotlib.matlab.hist(histogram_data, 10, normed=0)
 # add a 'best fit' line
 y = matplotlib.matlab.normpdf(bins, average[i], std_dev[i])
 l = matplotlib.matlab.plot(bins, y, 'r--')
 matplotlib.matlab.set(l, 'linewidth', 2)
 matplotlib.matlab.xlabel(DataDescription[i])
 matplotlib.matlab.ylabel('Number of Parts')
 matplotlib.matlab.plot([201,201],[0,40],'k--')
 matplotlib.matlab.title(PartNum + " -- " + PartDesc)
 matplotlib.matlab.set(matplotlib.matlab.gca(), 'xlim', [199, 205])
 matplotlib.matlab.show()
But it's not clear to me why the autoset would leave some of your data
offscreen - that shouldn't happen. I'll take a look at that code. Is
it possible for you to provide a complete example that replicates the
problem?
On an unrelated note, give that you like to use the fully qualified
names of all the functions, you might prefer the object oriented
interface
 n, bins, patches = matplotlib.matlab.hist(histogram_data, 10, normed=0)
 ax = matplotlib.matlab.subplot(111)
 y = matplotlib.mlab.normpdf(bins, average[i], std_dev[i])
 ^ normpdf is defined in mlab.py, not matlab.py
 lines = ax.plot(bins, y, 'r--')
 for line in lines:
 line.set_linewidth(2)
 ax.set_xlabel(DataDescription[i])
 ax.set_ylabel('Number of Parts')
 ax.plot([201,201],[0,40],'k--')
 ax.set_title(PartNum + " -- " + PartDesc)
 ax.set_xlim([199, 205])
 matplotlib.matlab.show()
Hope this helps,
John Hunter
From: Engelsma, D. <D.E...@La...> - 2004年01月22日 21:18:21
Hi -
I'm using the following code to generate a histogram. I also want to plot
the Upper Control Limit as a vertical line to the right of the histogram
bars and a Lower Control Limit to the left of the bars. Each Control Limit
would be represented by a vertical line. The code below does not include the
line necessary to plot a sample control limit.
# the histogram of the data
n, bins, patches = matplotlib.matlab.hist(histogram_data, 10, normed=0)
# add a 'best fit' line
y = matplotlib.matlab.normpdf(bins, average[i], std_dev[i])
l = matplotlib.matlab.plot(bins, y, 'r--')
matplotlib.matlab.set(l, 'linewidth', 2)
matplotlib.matlab.set(matplotlib.matlab.gca(), 'xlim', [199, 205])
matplotlib.matlab.xlabel(DataDescription[i])
matplotlib.matlab.ylabel('Number of Parts')
matplotlib.matlab.title(PartNum + " -- " + PartDesc)
matplotlib.matlab.show()
When I modify the code with the additional line to plot a Lower Control
Limit: 
# the histogram of the data
n, bins, patches = matplotlib.matlab.hist(histogram_data, 10, normed=0)
# add a 'best fit' line
y = matplotlib.matlab.normpdf(bins, average[i], std_dev[i])
l = matplotlib.matlab.plot(bins, y, 'r--')
matplotlib.matlab.set(l, 'linewidth', 2)
matplotlib.matlab.set(matplotlib.matlab.gca(), 'xlim', [199, 205])
matplotlib.matlab.xlabel(DataDescription[i])
matplotlib.matlab.ylabel('Number of Parts')
matplotlib.matlab.plot([201,201],[0,40],'k--')	<--- added this line to plot
a control limit
matplotlib.matlab.title(PartNum + " -- " + PartDesc)
matplotlib.matlab.show()
The x-axis limits are somehow automatically forced to something less than
that specified in the line: matplotlib.matlab.set(matplotlib.matlab.gca(),
'xlim', [199, 205]). The histogram appears as would be expected, but now I
cannot see my Control Limit (specified in the added line of code) as it
seems to be plotted off of the chart.
If I comment out the additional line (that plotted a vertical line as a
control limit), the x-axis limits return to normal, as expected (199 ->
205).
Why are the x-axis limits adjusted when I try to plot a vertical line as a
Control Limit?
Thanks in advance,
Dave Engelsma
From: John H. <jdh...@ac...> - 2004年01月22日 17:39:04
>>>>> "Jean-Baptiste" == Jean-Baptiste Cazier <jea...@de...> writes:
 Jean-Baptiste> Hi ! The more I look at matplotlib, the more nice
 Jean-Baptiste> feature I find. However there are more that I
 Jean-Baptiste> haven't found yet, eventhough they might be
 Jean-Baptiste> implemented. I would like to have a little more
 Jean-Baptiste> interactivity with the plot itself. By this I do
 Jean-Baptiste> not mean the interactivity with the python shell,
 Jean-Baptiste> but with the mouse: - Double click on the
 Jean-Baptiste> legend/axes/label allow it modification - Single
 Jean-Baptiste> Click on a drawn line give the properties of the
 Jean-Baptiste> function and/or location - In short, being able to
 Jean-Baptiste> treat elements of the figure as widgets - I reckon
 Jean-Baptiste> the whole figure is a DrawingArea and that might
 Jean-Baptiste> not be straight forward
 Jean-Baptiste> Of course just having a signal sent with the
 Jean-Baptiste> propoerties of the curves would be good enough
 Jean-Baptiste> Are more people interested in that ?
It's not something I need in my own work, but I think it would be a
good addition to matplotlib and I'd be happy to include it. To that
end, I wrote some demo code to get you started! I implemented an
object picker (currently only for tick labels and lines but this can
easily be extended to include the other elements of the figure).
I also wrote the start of a line properties dialog. It should be
straight forward to extend to incorporate the other line properties,
(markeredgecolor, etc...) and then to do the same for a text
properties dialog, etc....
I needed to add a few things to matplotlib to make this easier, so
you'll need to grab the snapshot at 
 http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-0.42a.tar.gz
and see the file examples/object_picker.py. 
Good luck!
John Hunter
From: John H. <jdh...@ac...> - 2004年01月22日 12:46:13
>>>>> "John" == John Hunter <jdh...@ac...> writes:
 John> Your paths to the GTK runtime library are not set properly.
 John> Check out
Alternatively, you should be able to use the WX backend with the
enthought edition of python with no extra installation. Just
 import matplotlib
 matplotlib.use('WX')
 from matplotlib.matlab import plot, show
 plot([1,2,3])
 show()
Good luck,
John Hunter
From: John H. <jdh...@ac...> - 2004年01月22日 08:36:31
>>>>> "David" == David Nordquest <Nor...@ga...> writes:
 David> I've just installed Matplotlib with the 2.3 version of
 David> Python packaged by Enthought & believe I followed the
 David> instructions on the Matplotlib web page. I am getting the
 David> following error message:
Hi David,
Your paths to the GTK runtime library are not set properly. Check out
 http://matplotlib.sourceforge.net/installing.html
and the following pygtk FAQ entry addresses the PATH issue at length
 http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq21.012.htp
Should cure what ails you,
John Hunter
From: Jean-Baptiste C. <jea...@de...> - 2004年01月22日 08:05:08
Hi !
The more I look at matplotlib, the more nice feature I find.
However there are more that I haven't found yet, eventhough they might
be implemented. I would like to have a little more interactivity with
the plot itself. By this I do not mean the interactivity with the python
shell, but with the mouse:
- Double click on the legend/axes/label allow it modification
- Single Click on a drawn line give the properties of the function=20
and/or location
- In short, being able to treat elements of the figure as widgets
- I reckon the whole figure is a DrawingArea and that might not be
straight forward
Of course just having a signal sent with the propoerties of the curves
would be good enough
Are more people interested in that ?
Takk
Kve=C3=B0ja
Jean-Baptiste
From: Randy H. <he...@iu...> - 2004年01月22日 03:06:19
Dave, 
Are you sure you installed pygtk as mentioned at
http://matplotlib.sourceforge.net/backends.html ?
You might print out your sys.path to verify.
--Randy
> -----Original Message-----
> From: mat...@li... [mailto:matplotlib-
> use...@li...] On Behalf Of David Nordquest
> Sent: Wednesday, January 21, 2004 9:48 PM
> To: mat...@li...
> Subject: [Matplotlib-users] Gobject missing
> 
> I've just installed Matplotlib with the 2.3 version of Python packaged
> by Enthought & believe I followed the instructions on the Matplotlib
web
> page. I am getting the following error message:
> 
> IDLE 1.0
> >>> from matplotlib.matlab import *
> 
> Traceback (most recent call last):
> File "<pyshell#0>", line 1, in -toplevel-
> from matplotlib.matlab import *
> File "D:\PROGRA~1\PYTHON23\Lib\site-packages\matplotlib\matlab.py",
> line 121, in -toplevel-
> from axes import Subplot, Axes
> File "D:\PROGRA~1\PYTHON23\Lib\site-packages\matplotlib\axes.py",
> line 119, in -toplevel-
> import backends
> File
>
"D:\PROGRA~1\PYTHON23\Lib\site-packages\matplotlib\backends\__init__.py"
,
> line 9, in -toplevel-
> from backend_gtk import AxisText, Figure, FigureManager, \
> File
> "D:\PROGRA~1\PYTHON23\Lib\site-
> packages\matplotlib\backends\backend_gtk.py",
> line 13, in -toplevel-
> import gobject
> ImportError: DLL load failed: One of the library files needed to run
> this application cannot be found.
> >>>
> 
> I'd be grateful for any suggestions.
> 
> Dave
> 
> 
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
From: David N. <Nor...@ga...> - 2004年01月22日 02:47:58
I've just installed Matplotlib with the 2.3 version of Python packaged 
by Enthought & believe I followed the instructions on the Matplotlib web 
page. I am getting the following error message:
IDLE 1.0
 >>> from matplotlib.matlab import *
Traceback (most recent call last):
 File "<pyshell#0>", line 1, in -toplevel-
 from matplotlib.matlab import *
 File "D:\PROGRA~1\PYTHON23\Lib\site-packages\matplotlib\matlab.py", 
line 121, in -toplevel-
 from axes import Subplot, Axes
 File "D:\PROGRA~1\PYTHON23\Lib\site-packages\matplotlib\axes.py", 
line 119, in -toplevel-
 import backends
 File 
"D:\PROGRA~1\PYTHON23\Lib\site-packages\matplotlib\backends\__init__.py", 
line 9, in -toplevel-
 from backend_gtk import AxisText, Figure, FigureManager, \
 File 
"D:\PROGRA~1\PYTHON23\Lib\site-packages\matplotlib\backends\backend_gtk.py", 
line 13, in -toplevel-
 import gobject
ImportError: DLL load failed: One of the library files needed to run 
this application cannot be found.
 >>>
I'd be grateful for any suggestions.
Dave

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