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


Showing 12 results of 12

From: John H. <jd...@gm...> - 2008年07月26日 22:56:47
On Sat, Jul 26, 2008 at 5:46 PM, Anand Patil
<ana...@gm...> wrote:
> Well, I lost it... whatever was hung up apparently gave up and killed Python
> when I shut down my local machine. It would still be nice to know how to fix
> this though, in case it happens again...
Sorry this happened -- I don't know how to fix this for future
reference, unfortunately.
JDH
From: Anand P. <ana...@gm...> - 2008年07月26日 22:46:24
Well, I lost it... whatever was hung up apparently gave up and killed Python
when I shut down my local machine. It would still be nice to know how to fix
this though, in case it happens again...
Thanks,
Anand
On Sat, Jul 26, 2008 at 12:34 PM, Anand Patil <
ana...@gm...> wrote:
> Hi all,
> I'm using matplotlib with the TKAgg on a remote machine running Ubuntu.
> Normally when I call 'plot' I see the plot in an X11 window, but I called
> 'plot' yesterday and Python went unresponsive... it doesn't listen to ctrl-C
> or anything, and it's been more than 24 hours.
>
> I would REALLY like to preserve the data Python has in memory. Is there any
> way to kill the plot command and wake Python back up?
>
> Thanks,
> Anand Patil
>
From: John H. <jd...@gm...> - 2008年07月26日 21:21:29
On Sat, Jul 26, 2008 at 3:47 PM, aditya shukla
<adi...@gm...> wrote:
> I am trying to plot a histogram of some values in an array:
> eg:-
> input_hist=[0.5,0.5,0.66,0.83,0.92,0.92,0.93,0.97,0.98,0.98,0.98,0.99]
> after issuing the pylab.hist(input_hist) statement these are the return
> values that i get.
>
> (array([2, 0, 0, 1, 0, 0, 1, 0, 3, 5]), array([ 0.5 , 0.549, 0.598,
> 0.647, 0.696, 0.745, 0.794, 0.843,
> 0.892, 0.941, 0.99 ]), <a list of 10 Patch objects>)
>
> Can someone please explain these return values , i did not understand them
> through the hist documentation.
The return value is a length three tuple with the following elements
(n, bins, patches)
 *n* - an array of counts in each bin in your histogram
 *bins* - an array edges of the bins that your data is binned into
 *patches* - a list of matplotlib rectangle instances (you can use
these to configure properties like facecolor, linewidth, etc...)
JDH
From: aditya s. <adi...@gm...> - 2008年07月26日 20:47:27
I am trying to plot a histogram of some values in an array:
eg:-
input_hist=[0.5,0.5,0.66,0.83,0.92,0.92,0.93,0.97,0.98,0.98,0.98,0.99]
after issuing the pylab.hist(input_hist) statement these are the return
values that i get.
(array([2, 0, 0, 1, 0, 0, 1, 0, 3, 5]), array([ 0.5 , 0.549, 0.598,
0.647, 0.696, 0.745, 0.794, 0.843,
 0.892, 0.941, 0.99 ]), <a list of 10 Patch objects>)
Can someone please explain these return values , i did not understand them
through the hist documentation.
Thanks in advance
Aditya
From: Bharathkrishna <kbh...@gm...> - 2008年07月26日 20:08:26
That works just great. thanks a lot.
On Sat, Jul 26, 2008 at 1:49 PM, Eric Firing <ef...@ha...> wrote:
> Bharathkrishna wrote:
>
>> By default the colorbar has 0 for black and 1 for white. I was wondering
>> if it is possible to reverse this for it show 0 for white and move upwords
>> to show 1 for black.
>> regards,
>> kbk
>>
>
> It sounds like what you are asking for is a reversed colormap, and all the
> standard colormaps included with mpl have reversed forms. The pylab
> interface does not provide functions for the reversed forms, but it does
> allow one to specify any of the reversed forms. To use a reversed gray
> colormap, for example, one might do something like this:
>
> import matplotlib.pyplot as plt
> import numpy as np
>
> img = plt.imshow(np.random.rand(10, 12))
> img.set_cmap(plt.cm.gray_r)
> plt.colorbar()
> plt.show()
>
> Eric
>
From: John H. <jd...@gm...> - 2008年07月26日 18:03:56
On Sat, Jul 26, 2008 at 12:55 PM, eliben <el...@gm...> wrote:
> Yes, WXAgg works.
> What is the difference between WXAgg and WX backends ? I couldn't find any
> real documentation on the subject and I would really like to know. Can WX do
> something WXAgg can't ?
WXAgg is the full featured wx backend, wx has limited support for all
of matplotlib's features. Agg is the antigrain C++ rendering library
(http://antigrain.com) that is the standard matplotlib raster backend.
 See http://matplotlib.sourceforge.net/doc/html/faq/installing_faq.html#id1
for details.
JDH
From: eliben <el...@gm...> - 2008年07月26日 17:55:30
John Hunter-4 wrote:
> 
> On Sat, Jul 26, 2008 at 3:33 AM, eliben <el...@gm...> wrote:
>>
>> Hello,
>>
>> I'm running the latest matplotlib (and wxPython) with Python 2.5.2 on Win
>> XP. Everything works fine, the plotting quality is excellent, and
>> interactive plotting works nicely with IPython.
>>
>> However, I much prefer the PyCrust interactive terminal and use it a lot.
>> I
>> tried following the directions
>> (http://matplotlib.sourceforge.net/interactive.html) for interactive
>> plotting from PyCrust:
>>
>> >>> import matplotlib
>> >>> matplotlib.interactive(True)
>> >>> matplotlib.use('WX')
>> >>> from matplotlib.pylab import *
>> >>> plot([1,2,3])
> 
> Does it work if you "use" 'WxAgg' instead? wxagg is the
> recommended/supported wx plotting backend.
> 
> JDH
> 
Hello,
Yes, WXAgg works. 
What is the difference between WXAgg and WX backends ? I couldn't find any
real documentation on the subject and I would really like to know. Can WX do
something WXAgg can't ? 
Thanks
Eli
-- 
View this message in context: http://www.nabble.com/Problem-plotting-interactively-from-PyCrust-tp18664574p18669376.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Eric F. <ef...@ha...> - 2008年07月26日 17:50:07
Bharathkrishna wrote:
> By default the colorbar has 0 for black and 1 for white. I was wondering 
> if it is possible to reverse this for it show 0 for white and move 
> upwords to show 1 for black.
> regards,
> kbk 
It sounds like what you are asking for is a reversed colormap, and all 
the standard colormaps included with mpl have reversed forms. The pylab 
interface does not provide functions for the reversed forms, but it does 
allow one to specify any of the reversed forms. To use a reversed gray 
colormap, for example, one might do something like this:
import matplotlib.pyplot as plt
import numpy as np
img = plt.imshow(np.random.rand(10, 12))
img.set_cmap(plt.cm.gray_r)
plt.colorbar()
plt.show()
Eric
From: Bharathkrishna <kbh...@gm...> - 2008年07月26日 16:14:28
By default the colorbar has 0 for black and 1 for white. I was wondering if
it is possible to reverse this for it show 0 for white and move upwords to
show 1 for black.
regards,
kbk
From: John H. <jd...@gm...> - 2008年07月26日 15:49:36
On Sat, Jul 26, 2008 at 3:33 AM, eliben <el...@gm...> wrote:
>
> Hello,
>
> I'm running the latest matplotlib (and wxPython) with Python 2.5.2 on Win
> XP. Everything works fine, the plotting quality is excellent, and
> interactive plotting works nicely with IPython.
>
> However, I much prefer the PyCrust interactive terminal and use it a lot. I
> tried following the directions
> (http://matplotlib.sourceforge.net/interactive.html) for interactive
> plotting from PyCrust:
>
> >>> import matplotlib
> >>> matplotlib.interactive(True)
> >>> matplotlib.use('WX')
> >>> from matplotlib.pylab import *
> >>> plot([1,2,3])
Does it work if you "use" 'WxAgg' instead? wxagg is the
recommended/supported wx plotting backend.
JDH
From: Anand P. <ana...@gm...> - 2008年07月26日 11:34:44
Hi all,
I'm using matplotlib with the TKAgg on a remote machine running Ubuntu.
Normally when I call 'plot' I see the plot in an X11 window, but I called
'plot' yesterday and Python went unresponsive... it doesn't listen to ctrl-C
or anything, and it's been more than 24 hours.
I would REALLY like to preserve the data Python has in memory. Is there any
way to kill the plot command and wake Python back up?
Thanks,
Anand Patil
From: eliben <el...@gm...> - 2008年07月26日 08:34:01
Hello,
I'm running the latest matplotlib (and wxPython) with Python 2.5.2 on Win
XP. Everything works fine, the plotting quality is excellent, and
interactive plotting works nicely with IPython.
However, I much prefer the PyCrust interactive terminal and use it a lot. I
tried following the directions
(http://matplotlib.sourceforge.net/interactive.html) for interactive
plotting from PyCrust:
 >>> import matplotlib
 >>> matplotlib.interactive(True)
 >>> matplotlib.use('WX') 
 >>> from matplotlib.pylab import *
 >>> plot([1,2,3])
 >>> xlabel('time (s)')
Unfortunately, this does not work. After I call "plot", an empty plot window
appears and the following is printed:
Traceback (most recent call last):
 File "<input>", line 1, in <module>
 File "C:\Python25\Lib\site-packages\matplotlib\pyplot.py", line 1947, in
plot
 b = ishold()
 File "C:\Python25\Lib\site-packages\matplotlib\pyplot.py", line 396, in
ishold
 return gca().ishold()
 File "C:\Python25\Lib\site-packages\matplotlib\pyplot.py", line 496, in
gca
 ax = gcf().gca(**kwargs)
 File "C:\Python25\Lib\site-packages\matplotlib\pyplot.py", line 218, in
gcf
 return figure()
 File "C:\Python25\Lib\site-packages\matplotlib\pyplot.py", line 208, in
figure
 draw_if_interactive()
 File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wx.py",
line 1179, in draw_if_interactive
 figManager.canvas.draw()
 File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wx.py",
line 901, in draw
 self.figure.draw(self.renderer)
 File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line 797, in
draw
 if self.frameon: self.figurePatch.draw(renderer)
 File "C:\Python25\Lib\site-packages\matplotlib\patches.py", line 239, in
draw
 gc = renderer.new_gc()
 File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wx.py",
line 361, in new_gc
 self.gc.select()
 File "C:\Python25\Lib\site-packages\matplotlib\backends\backend_wx.py",
line 475, in select
 self.SelectObject(self.bitmap)
AttributeError: GraphicsContextWx instance has no attribute 'SelectObject'
Any ideas on how to make this work ? 
Thanks in advance
Eli
-- 
View this message in context: http://www.nabble.com/Problem-plotting-interactively-from-PyCrust-tp18664574p18664574.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Showing 12 results of 12

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