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

Showing 16 results of 16

From: Fred M. <fma...@co...> - 2009年02月24日 23:20:18
Hi,
I've looked through the documentation, and see that it's possible to
plot a variety of symbols, including some customization, but what I'd
really like to do is use a text character as the point marker. The
only way I can think of doing this right now is to annotate the point
(with zero offset) with the text in question, and somehow hide the
actual point itself (is that even possible?).
Is there something easier/more obvious that I'm missing?
Thanks!
Fred.
From: Michael D. <md...@st...> - 2009年02月24日 16:37:14
rlp_GMC wrote:
> When I try to save a fig to a file I get the error 
>
> TclError Couldn't Connect to display ":0.0" 
>
> I looked in the Maplotlib users manual (latest version pg 144-146) and
> tried the following with no luck. BTW why is the same module named
> differently Linux/Win ?
> 
I presume you have different versions installed on each OS. pyplot was 
added only recently.
> import matplotlib
> matplotlib.use('Agg')
> import matplotlib.pylab as plt (linux ) or, import matplotlib.pyplot as
> plt (Windows)
> fig = plt.figure()
> ax = fig.add_subplot(111)
> ax.plot([1,2,3])
> fig.savefig('test.png')
>
> Is Matplotlib trying to display a plot to the monitor? 
> 
If TkAgg is set as your backend, then, yes, it will try to open a window 
on the display. If you need to run on a remote headless server, for 
instance, you can use the Agg backend. I see that you are doing that 
(with the matplotlib.use('Agg')) line, so I'm surprised why any 
Tcl-related message would be displayed at all.
Can you provide the information described here:
http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#reporting-problems
Cheers,
Mike
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Ryan M. <rm...@gm...> - 2009年02月24日 16:32:02
On Mon, Feb 23, 2009 at 9:33 PM, lehe <tim...@ya...> wrote:
>
> Hi,
> I am now plot two figures, The second one won't generate until I close the
> first one but the second one just flash and disappear very quickly. How can
> I keep both figures open until I close them myself?
> Thanks
>
> Here is my code:
> import matplotlib.pyplot as plt
>
> ......
>
> plt.figure() # ROC
> plt.plot(FPRs,TPRs)
> plt.xlabel('FP rate')
> plt.ylabel('TP rate')
> plt.title('ROC')
> plt.grid(True)
> plt.show()
>
> plt.figure() # histograms of scores for ESE and for decoys
> (bins, n) = histOutline.histOutline(ESE_scores)
> plt.plot(bins, n/sum(n), 'r-')
> (bins, n) = histOutline.histOutline(decoy_scores)
> plt.plot(bins, n/sum(n), 'b-')
> plt.title('Histogram of Scores')
> plt.legend(('ESE','decoy'))
> plt.show()
>
Delete your first call to show(). You only should call show() once, *after*
you generate all of your figures.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from: Norman Oklahoma United States.
From: Alan G I. <ala...@gm...> - 2009年02月24日 13:51:42
On 2/24/2009 3:44 AM Paul Anton Letnes apparently wrote:
> Is it possible to completely eliminate the 
> windows popping up? Though not very important, it is still annoying 
> that windows pop up when running a script in the background.
Sounds like you are calling `show`.
Don't.
Cheers,
Alan Isaac
From: david.froger <dav...@gm...> - 2009年02月24日 13:46:04
Hi, I have the same problem, I have joined examples.
http://www.nabble.com/file/p22180990/example.py example.py 
http://www.nabble.com/file/p22180990/example.pdf example.pdf 
http://www.nabble.com/file/p22180990/example.pdf example.pdf 
Zack 24 wrote:
> 
> Hi Richard, what exactly wrong here?
> I didn't found anything...
> 
> On 4 May 2007, Richard Vernhes wrote:
>> Here is attached the eps file with misaligned labels and grid.
>> Richard
> 
> 
> 
> -- 
> Zack
> 
> -------------------------------------------------------------------------
> 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
> 
> 
-- 
View this message in context: http://www.nabble.com/Problem-with-the-position-of-tick-labels-in-postscript-file-tp10324639p22180990.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Zunbeltz I. <zun...@gm...> - 2009年02月24日 13:01:19
Dear all,
If I am not wrong it is not possible to set the rotation and alignament 
options of xlabel and ylabel in the rcParam. I think this would be a 
nice idea. If there is nobody working on that I can have a look. Could
you please outline what classes/method should I look in the matplotlib
source code?
Regards
Zunbelz
-- 
Dr. Zunbeltz Izaola
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Methods and Instruments (SF1)
Glienicker Str. 100
D-14109 Berlin
Tel (030) 8062-3179 
Fax (030) 8062-2523 
Room A 349 
-- 
Dr. Zunbeltz Izaola
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Methods and Instruments (SF1)
Glienicker Str. 100
D-14109 Berlin
Tel (030) 8062-3179 
Fax (030) 8062-2523 
Room A 349 
From: Paul R. <pau...@ro...> - 2009年02月24日 09:49:48
Hi Dante,
 If I've understood you correctly, then you need to add one line:
# Set the limits of the x-axis, overriding default.
plt.xlim(0, 4)
Hope this helps, 
Paul
-- 
View this message in context: http://www.nabble.com/Very-simple-question%2C-but-I-can%27t-still-find-a-solution.-tp22152593p22179003.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Paul A. L. <pau...@gm...> - 2009年02月24日 08:44:50
On 24. feb.. 2009, at 08.11, Eric Firing wrote:
> Paul Anton Letnes wrote:
>> Hello,
>> I want to save a large number of figures to file, roughly like this:
>> import pylab
>> for i in xrange(100):
>> pylab.plot(x[i], y[i])
>> pylab.savefig('plot' + str(i) + '.eps')
>> pylab.figure()
>> However, a large number of figure windows show up on screen, and 
>> eventually, the application runs out of memory and crashes. How do 
>> I avoid these windows?
>
> Replace the pylab.figure() command with pylab.clf(), or with 
> pylab.close().
>
> Eric
>
>> Regards,
>> Paul.
Thanks, this helps a lot. Is it possible to completely eliminate the 
windows popping up? Though not very important, it is still annoying 
that windows pop up when running a script in the background.
Paul.
From: Johann R. <jr...@su...> - 2009年02月24日 07:18:48
Hi JJ
On Monday, 23 February 2009, Jae-Joon Lee wrote:
> Here is my modification.
>
> Bbox = matplotlib.transforms.Bbox.from_bounds(.4, .1, .5, .3)
> trans = ax.transAxes + fig.transFigure.inverted()
> l, b, w, h = matplotlib.transforms.TransformedBbox(Bbox,
> trans).bounds 
> axins = fig.add_axes([l, b, w, h]) 
Thanks for this - works like a charm. My experience with 
transformations is very limited but I can see that they are very 
powerful...
> > 3. Re-calculating [l, b, w, h] from tBbox seems cumbersome. Can
> > the add_axes() not call a Bbox instance directly?
>
> Also see my modification.
> I'm sorry but I don't understand what you mean by "add_axes() not
> call a Bbox instance directly?".
This has been answered by your modification - I wasn't aware of 
the .bounds attribute of a bounding box, which gives the required 
input to add_axes().
Thanks again
Johann
From: Eric F. <ef...@ha...> - 2009年02月24日 07:12:07
Paul Anton Letnes wrote:
> Hello,
> 
> I want to save a large number of figures to file, roughly like this:
> 
> import pylab
> for i in xrange(100):
> pylab.plot(x[i], y[i])
> pylab.savefig('plot' + str(i) + '.eps')
> pylab.figure()
> 
> However, a large number of figure windows show up on screen, and 
> eventually, the application runs out of memory and crashes. How do I 
> avoid these windows?
Replace the pylab.figure() command with pylab.clf(), or with pylab.close().
Eric
> 
> Regards,
> Paul.
> 
From: Paul A. L. <pau...@gm...> - 2009年02月24日 07:03:17
Hello,
I want to save a large number of figures to file, roughly like this:
import pylab
for i in xrange(100):
 pylab.plot(x[i], y[i])
 pylab.savefig('plot' + str(i) + '.eps')
 pylab.figure()
However, a large number of figure windows show up on screen, and 
eventually, the application runs out of memory and crashes. How do I 
avoid these windows?
Regards,
Paul.
From: rlp_GMC <rp...@re...> - 2009年02月24日 05:35:39
When I try to save a fig to a file I get the error 
TclError Couldn't Connect to display ":0.0" 
I looked in the Maplotlib users manual (latest version pg 144-146) and
tried the following with no luck. BTW why is the same module named
differently Linux/Win ?
import matplotlib
matplotlib.use('Agg')
import matplotlib.pylab as plt (linux ) or, import matplotlib.pyplot as
plt (Windows)
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot([1,2,3])
fig.savefig('test.png')
Is Matplotlib trying to display a plot to the monitor? 
rlp
-- 
View this message in context: http://www.nabble.com/TclError-Couldn%27t-Connect-to-display-%22%3A0.0%22-tp22176192p22176192.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: rlp_GMC <rp...@re...> - 2009年02月24日 05:22:07
-- 
View this message in context: http://www.nabble.com/TclError-Couldn%27t-Connect-to-display-%22%3A0.0%22-tp22176082p22176082.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Patrick M. <pat...@gm...> - 2009年02月24日 03:34:44
I have built matplotlib (and numpy since it is required for
matplotlib) with python2.6. Please note that these are UNSUPPORTED
and you use them at your own risk. They were built from the 9
February 2009 SVN so use at your own risk. You will have to install
numpy first and matplotlib second. I would also recommend installing
WxPython before installing matplotlib since there are some bugs using
Tkinter with matplotlib on python2.6. I've been too busy to try and
track it down.
http://code.patricktmarsh.com/builds/
-Patrick
On Sun, Feb 22, 2009 at 4:59 PM, Wai Yip Tung <tun...@ya...> wrote:
> Hello all,
>
> I find that Matplotlib only have Python 2.5 build for Windows. Is there
> any plan to release a 2.6 build soon? I am trying to build it from source
> but I run into numerous problem. I am still struggling to find all
> dependent packages. It will help a lot if the 2.6 installer is available.
>
> Thanks,
>
> Wai Yip
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a 600ドル discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
-- 
Patrick Marsh
Graduate Research Assistant
School of Meteorology
University of Oklahoma
http://www.patricktmarsh.com
From: lehe <tim...@ya...> - 2009年02月24日 03:33:25
Hi,
I am now plot two figures, The second one won't generate until I close the
first one but the second one just flash and disappear very quickly. How can
I keep both figures open until I close them myself?
Thanks
Here is my code:
 import matplotlib.pyplot as plt
 ......
 plt.figure() # ROC
 plt.plot(FPRs,TPRs)
 plt.xlabel('FP rate')
 plt.ylabel('TP rate')
 plt.title('ROC')
 plt.grid(True)
 plt.show()
 plt.figure() # histograms of scores for ESE and for decoys
 (bins, n) = histOutline.histOutline(ESE_scores)
 plt.plot(bins, n/sum(n), 'r-') 
 (bins, n) = histOutline.histOutline(decoy_scores)
 plt.plot(bins, n/sum(n), 'b-') 
 plt.title('Histogram of Scores')
 plt.legend(('ESE','decoy'))
 plt.show()
-- 
View this message in context: http://www.nabble.com/How-to-keep-figure-instead-of-flashing-tp22175200p22175200.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Adam M. <ram...@gm...> - 2009年02月24日 03:20:23
On Sun, Feb 22, 2009 at 16:59, Wai Yip Tung <tun...@ya...> wrote:
> I find that Matplotlib only have Python 2.5 build for Windows. Is there
> any plan to release a 2.6 build soon? I am trying to build it from source
> but I run into numerous problem. I am still struggling to find all
> dependent packages. It will help a lot if the 2.6 installer is available.
AFAIK matplolib doesn't support python-2.6 yet, as NumPy doesn't.
NumPy is expected to get python-2.6 support in the 1.3 release, so I
imagine matplotlib will support python-2.6 in a release following the
NumPy-1.3 release.
Cheers
Adam
1 message has been excluded from this view by a project administrator.

Showing 16 results of 16

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