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






Showing 16 results of 16

From: Joshua J. K. <jo...@ee...> - 2008年11月04日 23:39:19
On Tuesday 04 November 2008, Joshua J. Kugler said something like:
> > Here is one way to do it::
> >
> > for label in ax.get_xticklabels() + ax.get_yticklabels():
> > label.set_fontsize(12)
> >
> > But the artist tutorial above will give you a more in-depth
> > explanation of the various containers and methods.
>
> Sigh...how simple. Thank you very much!
OK, so it's half working. :)
I have code such as this:
 for label in self.main_axes.get_xticklabels():
 tick.label.set_fontsize(self.xtick_labelsize)
 main_ticks = self.main_axes.get_yticklabels()
 sub_ticks = (self.sub_axes.get_yticklabels()
 if hasattr(self.sub_axes, 'get_yticklabels') else [])
 for label in main_ticks + sub_ticks:
 label.set_fontsize(self.ytick_labelsize)
'self' is an object that gets turned in to a plot on a figure.
the sub_axes are because we have centigrade on one end of the plot, and 
Fahrenheit on the other end. The yticklabel code works fine. The 
xticklabel code has no effect.
The X axis is an AutoDateLocator and apparently set_fontsize isn't 
having an effect with that. I tried setting the font size even after 
setting the locator, and that doesn't appear to have any effect. Can 
you point me to the relevant docs on the subject? :)
Thanks!
j
-- 
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE
From: Joshua J. K. <jo...@ee...> - 2008年11月04日 22:35:19
On Tuesday 04 November 2008, you said something like:
> Hello,
>
> I have found that messages sometimes don't show up on these lists if
> your options are set not to receive mailings (eg. if you just want to
> look for replies in the archive).
Hmm, well, I do receive mail from that list, so it must be a glitch 
somewhere else, but that is interesting.
j
-- 
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE
From: James T. <jt...@ge...> - 2008年11月04日 22:20:31
Hello,
I have found that messages sometimes don't show up on these lists if
your options are set not to receive mailings (eg. if you just want to
look for replies in the archive).
James.
Michael Droettboom wrote:
> I don't know if there's any way of knowing from the outside...
> 
> You can send your question to me, and I can forward it to the list... 
> (Seems silly, but it might work.)
> 
> Mike
> 
> Joshua J. Kugler wrote:
>> I've sent two messages to this list, and neither have appeared in the 
>> archives, or come back to me. Did I use the right combination of words 
>> to get stopped by a spam filter? :)
>>
>> j
From: Joshua J. K. <jo...@ee...> - 2008年11月04日 22:00:55
On Tuesday 04 November 2008, John Hunter said something like:
> On Tue, Nov 4, 2008 at 3:13 PM, Joshua J. Kugler 
<jo...@ee...> wrote:
> > [Trying one more time.]
> >
> > I've read docs, search the list archive, and tried to step through
> > code.
>
> The docs you are looking for are
> http://matplotlib.sourceforge.net/users/artists.html.
>
> > How can I set things like xtick.labelsize and ytick.labelsize via
> > the object oriented interface? I have a graph object, and I can't
> > find anywhere in the data structure for the completed graph where
> > the tick label sizes are stored, nor can I find functions to set
> > them.
>
> Here is one way to do it::
>
> for label in ax.get_xticklabels() + ax.get_yticklabels():
> label.set_fontsize(12)
>
> But the artist tutorial above will give you a more in-depth
> explanation of the various containers and methods.
Sigh...how simple. Thank you very much!
j
-- 
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE
From: John H. <jd...@gm...> - 2008年11月04日 21:27:43
On Tue, Nov 4, 2008 at 3:13 PM, Joshua J. Kugler <jo...@ee...> wrote:
> [Trying one more time.]
>
> I've read docs, search the list archive, and tried to step through code.
The docs you are looking for are
http://matplotlib.sourceforge.net/users/artists.html.
> How can I set things like xtick.labelsize and ytick.labelsize via the
> object oriented interface? I have a graph object, and I can't find
> anywhere in the data structure for the completed graph where the tick
> label sizes are stored, nor can I find functions to set them.
Here is one way to do it::
 for label in ax.get_xticklabels() + ax.get_yticklabels():
 label.set_fontsize(12)
But the artist tutorial above will give you a more in-depth
explanation of the various containers and methods.
JDH
From: Joshua J. K. <jo...@ee...> - 2008年11月04日 21:14:09
[Trying one more time.]
I've read docs, search the list archive, and tried to step through code. 
How can I set things like xtick.labelsize and ytick.labelsize via the 
object oriented interface? I have a graph object, and I can't find 
anywhere in the data structure for the completed graph where the tick 
label sizes are stored, nor can I find functions to set them.
Even with lots of stepping through code, I can't find where I would 
manually set the size of the ticks.
I know about matplotlib.rc, and the setting in the config file, but I 
don't want to set things globally, I want to set per graph.
Thanks for any pointers!
j
-- 
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE
From: John H. <jd...@gm...> - 2008年11月04日 21:02:26
On Tue, Nov 4, 2008 at 2:48 PM, Joshua J. Kugler <jo...@ee...> wrote:
> I've sent two messages to this list, and neither have appeared in the
> archives, or come back to me. Did I use the right combination of words
> to get stopped by a spam filter? :)
I have not seen any messages from you in the moderator queue, which is
where the spam shows up. Not sure what the problem is, but this one
got through :-)
From: Joshua J. K. <jo...@ee...> - 2008年11月04日 20:59:57
On Tuesday 04 November 2008, Joshua J. Kugler said something like:
> On Tuesday 04 November 2008, Joshua J. Kugler said something like:
> > I've sent two messages to this list, and neither have appeared in
> > the archives, or come back to me. Did I use the right combination
> > of words to get stopped by a spam filter? :)
>
> Sigh, apparently. I'll trying posting again and see what I can do to
> improve my chances of getting through.
GRRRRRR!!!! I tried rewording my post, and it still does not show up on 
the list, nor do I get any e-mail back saying it's rejected, so I don't 
know *why* it's being rejected. Does anyone know the 
sourceforge "black list" so I can edit my message to not sue those 
words? :)
j
-- 
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE
From: Michael D. <md...@st...> - 2008年11月04日 20:52:24
I don't know if there's any way of knowing from the outside...
You can send your question to me, and I can forward it to the list... 
(Seems silly, but it might work.)
Mike
Joshua J. Kugler wrote:
> I've sent two messages to this list, and neither have appeared in the 
> archives, or come back to me. Did I use the right combination of words 
> to get stopped by a spam filter? :)
>
> j
>
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Joshua J. K. <jo...@ee...> - 2008年11月04日 20:51:45
On Tuesday 04 November 2008, Joshua J. Kugler said something like:
> I've sent two messages to this list, and neither have appeared in the
> archives, or come back to me. Did I use the right combination of
> words to get stopped by a spam filter? :)
Sigh, apparently. I'll trying posting again and see what I can do to 
improve my chances of getting through.
j
-- 
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE
From: Joshua J. K. <jo...@ee...> - 2008年11月04日 20:48:41
I've sent two messages to this list, and neither have appeared in the 
archives, or come back to me. Did I use the right combination of words 
to get stopped by a spam filter? :)
j
-- 
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE
From: Michael D. <md...@st...> - 2008年11月04日 15:46:43
I'm not a regular Windows user myself, but the following threads from a 
couple weeks ago might be relevant:
http://www.nabble.com/Matplotlib-in-Cygwin-td20069116.html
http://www.nabble.com/failure-with-python-setup.py-build-td20092879.html
Please let us know how that works for you.
Developers: Maybe we need to update setupext.py (yet again) for newer 
Cygwins?
Dennis Caceres wrote:
> Hello,
>
> I am trying to install MatPlotLib and I can't seem to get it to work.
> Any help with this problem would be greatly appreciated.
>
> THANKS!
>
>
> Below are are facts about my system. 
>
>
>
> $ uname -a
> CYGWIN_NT-5.1 (Prefer not to display) 1.5.25(0.156/4/2) 2008年06月12日 19:34 i686 Cygwin
>
>
> $ python setup.py build
> ============================================================================
> BUILDING MATPLOTLIB
> matplotlib: 0.98.3
> python: 2.5.1 (r251:54863, May 18 2007, 16:56:43) [GCC
> 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)]
> platform: cygwin
>
> REQUIRED DEPENDENCIES
> numpy: 1.2.1
> freetype2: 9.15.3
>
> OPTIONAL BACKEND DEPENDENCIES
> libpng: 1.2.12
> Traceback (most recent call last):
> File "setup.py", line 126, in <module>
> if check_for_tk() or (options['build_tkagg'] is True):
> File "/c/MatPlotLib/matplotlib/setupext.py", line 840, in check_for_tk
> explanation = add_tk_flags(module)
> File "/c/MatPlotLib/matplotlib/setupext.py", line 1084, in add_tk_flags
> result = parse_tcl_config(tcl_lib_dir, tk_lib_dir)
> File "/c/MatPlotLib/matplotlib/setupext.py", line 946, in parse_tcl_config
> tk_lib = tk_vars.get("default", "TK_LIB_SPEC")[1:-1].split()[0][2:]
> IndexError: list index out of range
>
>
>
> dcaceres@(prefer not to display) /c/MatPlotLib/matplotlib
> $ gcc --version
> gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
> Copyright (C) 2004 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Dennis C. <cac...@ya...> - 2008年11月04日 15:35:14
Hello,
I am trying to install MatPlotLib and I can't seem to get it to work.
Any help with this problem would be greatly appreciated.
THANKS!
Below are are facts about my system. 
$ uname -a
CYGWIN_NT-5.1 (Prefer not to display) 1.5.25(0.156/4/2) 2008年06月12日 19:34 i686 Cygwin
$ python setup.py build
============================================================================
BUILDING MATPLOTLIB
 matplotlib: 0.98.3
 python: 2.5.1 (r251:54863, May 18 2007, 16:56:43) [GCC
 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)]
 platform: cygwin
REQUIRED DEPENDENCIES
 numpy: 1.2.1
 freetype2: 9.15.3
OPTIONAL BACKEND DEPENDENCIES
 libpng: 1.2.12
Traceback (most recent call last):
 File "setup.py", line 126, in <module>
 if check_for_tk() or (options['build_tkagg'] is True):
 File "/c/MatPlotLib/matplotlib/setupext.py", line 840, in check_for_tk
 explanation = add_tk_flags(module)
 File "/c/MatPlotLib/matplotlib/setupext.py", line 1084, in add_tk_flags
 result = parse_tcl_config(tcl_lib_dir, tk_lib_dir)
 File "/c/MatPlotLib/matplotlib/setupext.py", line 946, in parse_tcl_config
 tk_lib = tk_vars.get("default", "TK_LIB_SPEC")[1:-1].split()[0][2:]
IndexError: list index out of range
dcaceres@(prefer not to display) /c/MatPlotLib/matplotlib
$ gcc --version
gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
On Tue, Nov 4, 2008 at 7:29 AM, Michael Droettboom <md...@st...> wrote:
> Can you be more specific about what is going wrong? The zoom magnifier
> seems to work fine for me with or without twinx, but perhaps we just
> have different expectations of how it works. Could you perhaps provide
> screenshots?
Note that only one of the two axes can get the events, and that is
determined by the axes zorder. So if you want ax1 to get the events
 ax1 = fig.add_subplot(111)
 ax1t = ax1.twinx()
 ax1.set_zorder(10)
 ax1t.set_zorder(1)
JDH
From: Michael D. <md...@st...> - 2008年11月04日 13:29:50
Can you be more specific about what is going wrong? The zoom magnifier 
seems to work fine for me with or without twinx, but perhaps we just 
have different expectations of how it works. Could you perhaps provide 
screenshots?
I'm checking against SVN trunk. I didn't check against 0.90.1, since it 
would require installing an older version of numpy, and other dependency 
dances etc. But I'm happy to dig further once I have a better idea of 
what is going wrong for you.
This FAQ explains how to get the version number and other useful 
information for a bug report:
http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#report-a-problem
Cheers,
Mike
wet_colored)arch wrote:
> I am trying to code an application with two checkboxes, one associated with
> each axis on a simple plot. I can then turn on and off lines in the plot
> that are scaled either to the left side or right side of the plot.
>
> This is working fine and patterned after some of the examples from
> matplotlib.
>
> However, when I use the toolbar feature with the "magnifier" the scaling is
> not usually correct. More specifically, if I select an area with the
> magnifier, the next drawing of the information is not scaled right. 
> (ususally it is a smaller subset of the data selected)
>
> I have confirmed when I run without twinx , the magnifier works fine. 
>
> I also have noticed that when running the example from matplotlib the same
> thing happens. I have searched a bit looking for perhaps a bug or comment in
> forums on how to workaround this or perhaps I have done something wrong, but
> no luck. Perhaps I don't understand how the magnifier is supposed to work
> but when I disable the twinx capability of my code, things seem to work
> fine. (I'm still mostly a noob but I am persistent.)
>
> I believe I have 0.90 or perhaps one earlier. I wasn't completely sure how
> to check but 0.90 is shown in the __init__.py file.
>
> I have attached the matplotlib provided example that I feel doesn't work
> right. I also have a snippet of my code below. (which is structured a bit
> different than the example but when I run identical to the snippet, using
> the structure of my code I get an error due to twinx not being a method of
> subplot - as I recall)
>
> from two scales example provided with matplotlib
> 
>
> from pylab import *
>
> ax1 = subplot(111)
> t = arange(0.01, 10.0, 0.01)
> s1 = exp(t)
> plot(t, s1, 'b-')
> xlabel('time (s)')
> ylabel('exp')
>
>
> # turn off the 2nd axes rectangle with frameon kwarg
> ax2 = twinx()
> s2 = sin(2*pi*t)
> plot(t, s2, 'r.')
> ylabel('sin')
> ax2.yaxis.tick_right()
> show()
>
>
> snippet from my code >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
> self.axL=subplot(132, position=[0.2,0.1,0.6,0.8])
> self.axR=twinx(self.axL)
> self.rax1=subplot(131, position=[0.01, 0.10, 0.14, 0.8])
> self.rax2=subplot(133, position=[0.85, 0.10, 0.14, 0.8])
> 
> for key in sorted(dict):
> if dict[key][1]<>'N': #~ providing key to allow for skipping
> data set
> visibility=dict[key][2]
> exec("self.l%s, =
> self.ax%s.plot(glbl.fusdata%s,visible=visibility,ls=dict[key][4],color=dict[key][3])"%
> (key,dict[key][1],key))
> 
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Jae-Joon L. <lee...@gm...> - 2008年11月04日 10:01:47
> I spent some time working on it and came to the following conclusion:
> if the mpl figure is fully transparent, you see whatever is in the gui
> rendering buffer, which may be unintiialized memory. In some sense,
> mpl is doing what is asked of it, making a fully transparent figure.
> Clearing the agg buffer is not enough if it is transparent -- you also
> have to init the canvas buffer. The question is: with what?
>
I think what we may want is to let the the gui backend do the
compositing, i.e., showing a composite image of the background (of the
canvas widget) and what is in the agg buffer.
In recent version of GTK(2.8 and later), you can do it with cairo.
The attached is a test patch for the gtkagg backend. It includes a
small example which sets an image as a background of the canvas (see
the attached image).
I found this patch make the mpl quite slowed down in my unix box, but
fine in my macbook (my guess is it depends on whether cairo uses the
hardware acceleration or not).
Regards,
-JJ

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