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




Showing 12 results of 12

From: sa6113 <s.p...@gm...> - 2008年09月15日 23:09:18
I want to use findobj attribute by this code,
import matplotlib.pyplot as plt 
import matplotlib.text as text 
.
.
.
fig = plt.figure()
for t in fig.findobj(text.Text): 
 t.set_family(somefamily) 
but I get this error :
Figure instance has no attribute 'findobj'
please help me.
sa6113 wrote:
> 
> I want to use findobj attribute by this code,
> 
> import matplotlib.text as text 
> 
> for t in fig.findobj(text.Text): 
> t.set_family(somefamily) 
> 
> but I get this error :
> Figure instance has no attribute 'findobj'
> 
> please help me.
> 
-- 
View this message in context: http://www.nabble.com/findobj-problem%21-tp19505934p19505951.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: sa6113 <s.p...@gm...> - 2008年09月15日 23:07:02
I want to use findobj attribute by this code,
import matplotlib.text as text 
for t in fig.findobj(text.Text): 
 t.set_family(somefamily) 
but I get this error :
Figure instance has no attribute 'findobj'
please help me.
-- 
View this message in context: http://www.nabble.com/findobj-problem%21-tp19505934p19505934.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Jae-Joon L. <lee...@gm...> - 2008年09月15日 14:25:23
>
> Kind of awkward, but
>
> fig.canvas.manager.window.wm_title()
>
I guess this is backend dependent. In my Gtk backend, I don't have
such a method. But I found fig.canvas.manager.window.get_title().
Thanks!
-JJ
From: Michael M. F. <mf...@ph...> - 2008年09月15日 13:59:06
On Sep 15, 2008, at 4:53 PM, Jae-Joon Lee wrote:
> To change the window title, you may use
>
> fig.canvas.set_window_title("My Title")
>
> But I couldn't find any public method to obtain the current window 
> title.
Kind of awkward, but
fig.canvas.manager.window.wm_title()
returns the current title...
Michael.
From: Jae-Joon L. <lee...@gm...> - 2008年09月15日 13:53:35
To change the window title, you may use
 fig.canvas.set_window_title("My Title")
But I couldn't find any public method to obtain the current window title.
If you just want to have a title associated with a figure, I guess you
can simply define your title attribute. For example,
 fig.my_figure_title = "My Title"
Then when you want to save the figure later,
 fig.savefig(fig.my_figure_title + ".png")
IHTH,
-JJ
On Mon, Sep 15, 2008 at 2:51 PM, Mathieu Dubois <mat...@li...> wrote:
> Hi,
>
> I'm a (still) beginner in scipy and I have a small problem with figures.
> Let me
> explain.
>
> I have to plot a lot of huge data so I have a lot of figures. I have set
> title and axes names. All the handles are in a list (the list can vary
> at run time according to the user input).
>
> My goal is to save the figures (with savefig()). For this I want to
> write a loop which look like this:
> for fig in fig_list
> figure(fig) # Select current figure
> savefig('%s.png' % fig.title, format='png') # Save it as 'title'.png
>
> The problem is well explained in a previous message:
> http://sourceforge.net/mailarchive/message.php?msg_id=a7f1ef730709101012o20abd37aj116e100d9b105d52%40mail.gmail.com
> but nobody has answered to this post.
>
> Any help would appreciated.
> Regards,
> Mathieu
>
> -------------------------------------------------------------------------
> 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
>
From: John H. <jd...@gm...> - 2008年09月15日 12:56:49
On Mon, Sep 15, 2008 at 7:13 AM, sa6113 <s.p...@gm...> wrote:
>
> I think I have to explain it more clear, I want to show a fontdialog to the
> user contain font name, style, size and some effect, and user will be able
> select all these changes for legend and axis labels separately, then I want
> to effect these items to my plot as you know user has very different options
> and it will be difficult to use font's path.
>
> Is that possible to set all those options are selected by user in fontdialog
> box to the plot??
>
> If it is. How? I would be thankful if you help me.
Yes, this is easily doable. The fond obj command works on any
matplotlib instance, so for example, if you wanted to selectively
change the text properties of the xaxis::
 # see matplotlib.text.Text for information about the settable properties at
 # http://matplotlib.sourceforge.net/doc/html/api/artist_api.html#matplotlib.text.Text
 for t in ax.xaxis.findobj(text.Text):
 t.set_fontstyle('something')
 t.set_fontsize(12)
for the legend you would do the same:::
 leg = ax.get_legend()
 for t in leg.findobj(text.Text):
 # set some properties here
All the text setters just forward the calls onto the FontProperties
object (see matplotlib.font_manager.FontProperties) so take a look
at this object to see what is available. Eg, from my previous post,
you can set the fontname explicitly with::
 prop.set_file('somefile.ttf')
JDH
From: sa6113 <s.p...@gm...> - 2008年09月15日 12:13:49
I think I have to explain it more clear, I want to show a fontdialog to the
user contain font name, style, size and some effect, and user will be able
select all these changes for legend and axis labels separately, then I want
to effect these items to my plot as you know user has very different options
and it will be difficult to use font's path.
Is that possible to set all those options are selected by user in fontdialog
box to the plot??
	
If it is. How? I would be thankful if you help me.
 
sa6113 wrote:
> 
> I want to set all font system to my texts, but I can't set all the fonts.
> I am using this code:
> 
> font = FontProperties( size='small' ,fname = 'Tahoma' )
> self.ax.legend( line, label, legend , prop = font )
> 
> It raises this error :
> font = FT2Font(str(fname))
> RuntimeError: Could not open facefile Tahoma; Cannot_Open_Resource
> 
> Should I add a font family for that before? How?
> 
-- 
View this message in context: http://www.nabble.com/set-font-problem.-tp19468970p19491749.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Mathieu D. <mat...@li...> - 2008年09月15日 11:51:49
Hi,
I'm a (still) beginner in scipy and I have a small problem with figures. 
Let me
explain.
I have to plot a lot of huge data so I have a lot of figures. I have set 
title and axes names. All the handles are in a list (the list can vary 
at run time according to the user input).
My goal is to save the figures (with savefig()). For this I want to 
write a loop which look like this:
for fig in fig_list
 figure(fig) # Select current figure
 savefig('%s.png' % fig.title, format='png') # Save it as 'title'.png
The problem is well explained in a previous message:
http://sourceforge.net/mailarchive/message.php?msg_id=a7f1ef730709101012o20abd37aj116e100d9b105d52%40mail.gmail.com
but nobody has answered to this post.
Any help would appreciated.
Regards,
Mathieu
From: Paul H. <pha...@gm...> - 2008年09月15日 07:43:44
Is there any way to specify the thickness of the error lines in bar plots --
a similar attribute to specifying the edge widths of the bars? thanks
From: Eric F. <ef...@ha...> - 2008年09月15日 07:14:29
Stephen George wrote:
> Hi Fernando,
>> So, I want to plot a line, but controlling the labels on the tickers 
>> of the x axis. For instance, if I'm plotting (1000, 5), (2000, 10), 
>> (3000, 10), the ticks on the x axis might show 1000 2000 3000 
>> or 1 2 3 x1e3. I want to control it, set it to 1 
>> and obtain the first example, and set to 1000 and obtain the second one.
> I not 100% clear what you want to achieve, however look into your 
> matplotlib distribution for ticker.py
> 
> There is Formatter classes that control such things.
> 
> For example the existing ScalarFormatter, has a method set_scientific() 
> to enable /disable scientific formatting. My reading of your description 
> suggests this is what you are after or you might get some joy out of 
> set_powerlimits() or the argument useOffset.
> 
> If your requirements are different you may need to create your own 
> formatter class.
The only thing I can add at this point is that there is also an 
Axes.ticklabel_format() method that calls set_scientific, and doesn't 
require you to dig around to figure out how to access the formatter.
Eric
> 
> Steve
> 
> -------------------------------------------------------------------------
> 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
From: Stephen G. <ste...@op...> - 2008年09月15日 04:28:52
Hi Fernando,
> So, I want to plot a line, but controlling the labels on the tickers 
> of the x axis. For instance, if I'm plotting (1000, 5), (2000, 10), 
> (3000, 10), the ticks on the x axis might show 1000 2000 3000 
> or 1 2 3 x1e3. I want to control it, set it to 1 
> and obtain the first example, and set to 1000 and obtain the second one.
I not 100% clear what you want to achieve, however look into your 
matplotlib distribution for ticker.py
There is Formatter classes that control such things.
For example the existing ScalarFormatter, has a method set_scientific() 
to enable /disable scientific formatting. My reading of your description 
suggests this is what you are after or you might get some joy out of 
set_powerlimits() or the argument useOffset.
If your requirements are different you may need to create your own 
formatter class.
Steve
From: Fernando F. <fer...@gm...> - 2008年09月15日 03:19:15
Hi Eric,
Reading it one day after I can tell it's really unclear, sorry about
that....
So, I want to plot a line, but controlling the labels on the tickers of the
x axis. For instance, if I'm plotting (1000, 5), (2000, 10), (3000, 10),
the ticks on the x axis might show 1000 2000 3000 or 1 2
 3 x1e3. I want to control it, set it to 1 and obtain the first
example, and set to 1000 and obtain the second one.
Thanks,
Fernando.
On Sun, Sep 14, 2008 at 8:53 PM, Eric Firing <ef...@ha...> wrote:
> fernandof wrote:
>
>> Googled, looked for documentation, even tried the source code but couldn't
>> find it.
>>
>
> You may need to be more precise in describing what you want to do; it is
> far from clear to me from your subject line.
>
> Eric
>

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