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

Showing 7 results of 7

Janne Blomqvist <blo...@gm...> writes:
> The problem I'm having is that as the figure is then pretty small, I
> can scale font sizes, axis sizes, line widths etc., but what I've been
> unable to figure out is how to scale dashed or dotted lines, as well
> as the thickness of the legend border box. 
It seems that there are no rc settings for these, but you can adjust
them as follows:
> a.plot(x, y, '--', label='foo bar')
Change this to 
 a.plot(x, y, '--', label='foo bar', dashes=(2,2))
The value of dashes is the number of points of ink followed by the
number of points of whitespace. It defaults to (6,6) for the '--'
linestyle (found in the dashd dictionary of backend_bases.py).
> a.legend()
Change this to
 lg = a.legend()
 fr = lg.get_frame()
 fr.set_lw(0.2)
-- 
Jouni K. Seppänen
http://www.iki.fi/jks
From: David M. <dm...@ya...> - 2010年07月10日 13:15:14
I am getting a recursive error with the following script. When using plot 
instead of semilogy, I get the desired result. Does anyone know of a 
workaround?
from pylab import *
class Hover(object):
 def __call__(self, ev):
 print ev.canvas.figure.hitlist(ev)
fig = plt.figure()
ax=fig.add_subplot(111)
ax.semilogy([1,5,10])
hover = Hover()
fig.canvas.mpl_connect('motion_notify_event',hover)
show()
 
On Fri, Jul 9, 2010 at 9:52 PM, bdb112 <boy...@an...> wrote:
> python or ipython. See version numbers at end.
>
>
>
> import time
> # Note - this version is meant to be pasted!
>
> print('When pasted in to ipython -pylab, the plot should appear immediately,
> '
>   ' then the ipython prompt after sleep(2): but the plot waits until the
> prompt!')
> plot([3,4], hold=0)
> ion()
> show()
> time.sleep(2)
>
> Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
> IPython 0.10
> matplotlib.__version__  Out[3]: '0.99.1.1
Any chance you can test this with the latest release 1.0.0?
JDH
From: bdb112 <boy...@an...> - 2010年07月10日 02:52:11
I have successfully used ipython -pylab under w32 python, but under the
builtin ipython under ubuntu 9 and 10, the graphics display thread seems to
block until the ipython command line - as if the threading (internal to
ipython etc) is not happening.
For example if the following is pasted in, the plot appears after 2 seconds,
instead of straight away, as it used to in w32 python 2.6, (and I think, but
am not sure, in earlier linux pythons). The reason I want this feature is
to show intermediate
results of long computations, without blocking, as would happen in straight
python or ipython. See version numbers at end.
import time
# Note - this version is meant to be pasted!
print('When pasted in to ipython -pylab, the plot should appear immediately,
'
 ' then the ipython prompt after sleep(2): but the plot waits until the
prompt!')
plot([3,4], hold=0)
ion()
show()
time.sleep(2)
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) 
IPython 0.10
matplotlib.__version__ Out[3]: '0.99.1.1'
-- 
View this message in context: http://old.nabble.com/interactive-plots-in-ipython--pylab-are-delayed-until-ipython-prompt-tp29123816p29123816.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Benjamin R. <ben...@ou...> - 2010年07月10日 01:05:46
Jeremy,
I believe that 0.99.1 is fairly old. I don't know when Axes3D came along,
but I am sure you can find it in 0.99.3. It is most definitely in 1.0, but
you might not need to go that far if your distro does not provide it.
Ben Root
On Fri, Jul 9, 2010 at 4:50 PM, Jeremy Conlin <jlc...@gm...> wrote:
> On Thu, Jul 8, 2010 at 8:41 AM, Jeremy Conlin <jlc...@gm...> wrote:
> > On Sun, Jul 4, 2010 at 8:38 PM, Benjamin Root <ben...@ou...> wrote:
> >> Jeremy,
> >>
> >> The pcolor function can take a vmin and a vmax parameter if you wish to
> >> control the colorscaling. In addition, you can use a special array
> >> structure called a "masked array" to have pcolor ignore "special"
> values.
> >> Assuming your data is 'vals':
> >>
> >> vals_masked = numpy.ma.masked_array(vals, vals == 0.0)
> >>
> >> Note that depending on your situation, doing an equality with with a
> >> floating point value probably isn't very reliable, so be sure to test
> and
> >> modify to suit your needs. 'vals_masked' can then be passed to pcolor
> >> instead of vals.
> >
> > Yes, I think this is exactly what I need. Thanks!
> >
>
> To follow up with my response, I tried the above and it works nicely
> with pyplot.pcolor. I would like to get a 3D version of this, like I
> get using Axes3D.plot_surface. Is this just not implemented yet? I
> am using 0.99.1.1. Has this been implemented in matplotlib 1.0?
>
> Thanks,
> Jeremy
>
From: John H. <jd...@gm...> - 2010年07月10日 00:38:04
On Fri, Jul 9, 2010 at 3:10 PM, Preben Randhol <ra...@pv...> wrote:
> I'm trying to plot several subplots. I have setup a scrollwidget and
> viewport and I pack a canvas into a vbox in the viewport.
>
> Problem is that when I scroll, either some of the subplots are missing,
> or I get an error when I try to zoom on a graph that argument is not a
> gdk.gtk.image (or something like that) but None.
>
> I thought this was fixed in 1.0, but it isn't
>
> Please advice!
Does this example work for you?
 http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_gtk3.html
It uses a ScrolledWindow.
Also, are you using backend_gtk or backend_gtkagg (and does it matter
for your problem?)
If you could create a minimal example starting with
embedding_in_gtk3.py that replicates your problem, we're more likely
to be able to help.
JDH
From: John H. <jd...@gm...> - 2010年07月10日 00:36:52
On Fri, Jul 9, 2010 at 3:10 PM, Preben Randhol <ra...@pv...> wrote:
> Hi
>
> I'm trying to plot several subplots. I have setup a scrollwidget and
> viewport and I pack a canvas into a vbox in the viewport.
>
> Problem is that when I scroll, either some of the subplots are missing,
> or I get an error when I try to zoom on a graph that argument is not a
> gdk.gtk.image (or something like that) but None.
>
> I thought this was fixed in 1.0, but it isn't
>
> Please advice!
Does this example work for you?
http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_gtk3.html
It uses a ScrolledWindow.
Also, are you using backend_gtk or backend_gtkagg (and does it matter
for your problem?)
If you could create a minimal example starting with
embedding_in_gtk3.py that replicates your problem, we're more likely
to be able to help.
JDH

Showing 7 results of 7

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