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






Showing 11 results of 11

From: Jae-Joon L. <lee...@gm...> - 2008年08月27日 19:36:09
Hi Uri,
What version of matplotlib are you using? I guess the get_frame()
method is deprecated (but still available) in the recent version of
matplotlib. Instead, frame and patch attributes can be used.
I only started looking into the code behind the matplotlib recently so
I don't know much about how it can be handled in the older version. I
suggest you upgrade to the recent version of matplotlib if possible.
Or you may wait for others to answer.
I'll send you Tony's class in a separate email. But I'm not sure if it
will work with older versions.
Regards,
-JJ
On Wed, Aug 27, 2008 at 3:12 PM, Uri Laserson <las...@mi...> wrote:
> Hi JJ,
>
> Thanks for the suggestion...I think we are close. First, the AxesSubplot
> object which is returned from ax=gca() does not have a 'frame'
> object/attribute. However, ax.get_frame() gives me a rectangle object, but
> when I call the set_visible(False) method, it turns the background gray
> while leaving all the axes in place (the inverse behavior of what you said
> below). Any idea how to reverse this?
>
> Also, the link to the attachment for Tony's class is broken. Any idea where
> I could get the file?
>
> Thanks!
> Uri
>
> On Wed, Aug 27, 2008 at 14:38, Jae-Joon Lee <lee...@gm...> wrote:
>>
>> You can suppress the tick marks on the top and right axis as Mathieu
>> suggested. Setting frame_on as False will suppresse both the bounding
>> lines and the white background patch of the axes. You can suppress
>> only the bounding lines by
>>
>> ax = gca()
>> ax.frame.set_visble(False)
>>
>> Note that this will delete not only the top and the right axis lines
>> but also the bottom and the left ones.
>> Therefore, you need to manually draw the axis lines (bottom and left).
>>
>> p, = ax.plot([0,0],[0,1], "k-", transform=ax.transAxes)
>> p.set_clip_on(False)
>> p, = ax.plot([0,1],[0,0], "k-", transform=ax.transAxes)
>> p.set_clip_on(False)
>>
>>
>> You may consider to use a custom axes class by Tony.
>>
>> http://thread.gmane.org/gmane.comp.python.matplotlib.general/13619
>>
>> Regards,
>>
>> -JJ
>>
>>
>> On Tue, Aug 26, 2008 at 10:35 PM, Uri Laserson <las...@mi...> wrote:
>> > Hi,
>> >
>> > Is it possible to create plots that only have a single x-axis on the
>> > bottom
>> > and a single y-axis on the left, while suppressing an upper or right
>> > axis
>> > (i.e., have the graph be "open")?
>> >
>> > Thanks!
>> > Uri
>> >
>> >
>> > --
>> > Uri Laserson
>> > PhD Candidate, Biomedical Engineering
>> > Harvard Medical School (Genetics)
>> > Massachusetts Institute of Technology (Mathematics)
>> > phone +1 917 742 8019
>> > las...@mi...
>> >
>> >
>> > -------------------------------------------------------------------------
>> > 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
>> >
>> >
>
>
>
> --
> Uri Laserson
> PhD Candidate, Biomedical Engineering
> Harvard Medical School (Genetics)
> Massachusetts Institute of Technology (Mathematics)
> phone +1 917 742 8019
> las...@mi...
>
From: Jae-Joon L. <lee...@gm...> - 2008年08月27日 18:39:01
You can suppress the tick marks on the top and right axis as Mathieu
suggested. Setting frame_on as False will suppresse both the bounding
lines and the white background patch of the axes. You can suppress
only the bounding lines by
 ax = gca()
 ax.frame.set_visble(False)
Note that this will delete not only the top and the right axis lines
but also the bottom and the left ones.
Therefore, you need to manually draw the axis lines (bottom and left).
 p, = ax.plot([0,0],[0,1], "k-", transform=ax.transAxes)
 p.set_clip_on(False)
 p, = ax.plot([0,1],[0,0], "k-", transform=ax.transAxes)
 p.set_clip_on(False)
You may consider to use a custom axes class by Tony.
 http://thread.gmane.org/gmane.comp.python.matplotlib.general/13619
Regards,
-JJ
On Tue, Aug 26, 2008 at 10:35 PM, Uri Laserson <las...@mi...> wrote:
> Hi,
>
> Is it possible to create plots that only have a single x-axis on the bottom
> and a single y-axis on the left, while suppressing an upper or right axis
> (i.e., have the graph be "open")?
>
> Thanks!
> Uri
>
>
> --
> Uri Laserson
> PhD Candidate, Biomedical Engineering
> Harvard Medical School (Genetics)
> Massachusetts Institute of Technology (Mathematics)
> phone +1 917 742 8019
> las...@mi...
>
> -------------------------------------------------------------------------
> 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: stuartornum <st...@mu...> - 2008年08月27日 14:14:28
Hi,
I would like to be able to plot dates along the X axis' with values up the
Y. However Im having problems with the correct format in order to pass to
plot_date().
This is what I have so far: (example)
####################################
List = [ [datetime.datetime(2008, 7, 12, 5, 12)], ['46.8'] ]
plot_date(List[0], List[1])
#####################################
Returns error:
c = numeric.array(data, dtype=tc, copy=True, order=order)
ValueError: setting an array element with a sequence.
#####################################
I have looked at the pylab example for plot_date, however it uses a drange()
to figure out the dates and doesn't show me how to do it one by one.
Thank you for your time. 
-- 
View this message in context: http://www.nabble.com/plot_date%28%29---Correct-format-to-plot-tp19181899p19181899.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Michael D. <md...@st...> - 2008年08月27日 12:13:23
Mathieu Leplatre wrote:
> For the colors, I just use :
>
> textobj.set_color( #FF0000 )
> textobj.set_alpha( 0.5 )
> 
Just to point out -- from this you have access to ~16 million colors.
> For the fonts, I never noticed there were a limit :
>
> textobj.set_fontname( "DejaVu Sans" )
>
> I would be interested in a way to check if the selected font exists on
> the system or not, because currently no exception is raised.
> 
This *should* work -- matplotlib should be able to use any font on your 
system. If not, that's a bug, so please let us know. To help us 
diagnose the problem, please look here:
http://matplotlib.sourceforge.net/doc/html/faq/troubleshooting_faq.html#how-do-i-report-a-problem
Cheers,
Mike
> Hope it helps.
>
> On Wed, Aug 27, 2008 at 3:54 AM, sa6113 <s.p...@gm...> wrote:
> 
>> Dear All,
>> how can I set more color and font for my plot, as I know matplotlib just
>> supporte 8 color strings and five fonts.
>> Is there any way to extend it for all color and font from system ?
>> has every one any useful code about that?
>> Thanks
>> --
>> View this message in context: http://www.nabble.com/set-font-and-color-problem-tp19175632p19175632.html
>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>
>>
>> -------------------------------------------------------------------------
>> 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
>>
>> 
>
> -------------------------------------------------------------------------
> 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: Mathieu L. <lep...@gm...> - 2008年08月27日 11:20:20
Uri,
You could look have a look at :
gca().xaxis.tick_bottom()
gca().yaxis.tick_left()
or hide the frame :
ax = axes( FrameOne=False )
Hope this helps.
On Tue, Aug 26, 2008 at 11:35 PM, Uri Laserson <las...@mi...> wrote:
> Hi,
>
> Is it possible to create plots that only have a single x-axis on the bottom
> and a single y-axis on the left, while suppressing an upper or right axis
> (i.e., have the graph be "open")?
>
> Thanks!
> Uri
>
>
> --
> Uri Laserson
> PhD Candidate, Biomedical Engineering
> Harvard Medical School (Genetics)
> Massachusetts Institute of Technology (Mathematics)
> phone +1 917 742 8019
> las...@mi...
>
> -------------------------------------------------------------------------
> 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: Mathieu L. <lep...@gm...> - 2008年08月27日 11:04:43
For the colors, I just use :
textobj.set_color( #FF0000 )
textobj.set_alpha( 0.5 )
For the fonts, I never noticed there were a limit :
textobj.set_fontname( "DejaVu Sans" )
I would be interested in a way to check if the selected font exists on
the system or not, because currently no exception is raised.
Hope it helps.
On Wed, Aug 27, 2008 at 3:54 AM, sa6113 <s.p...@gm...> wrote:
>
> Dear All,
> how can I set more color and font for my plot, as I know matplotlib just
> supporte 8 color strings and five fonts.
> Is there any way to extend it for all color and font from system ?
> has every one any useful code about that?
> Thanks
> --
> View this message in context: http://www.nabble.com/set-font-and-color-problem-tp19175632p19175632.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> 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: Mathieu L. <lep...@gm...> - 2008年08月27日 10:58:51
Hi Uri,
AFAI, in matplotlibrc you have :
### TICKS
# see http://matplotlib.sourceforge.net/matplotlib.axis.html#Ticks
#xtick.direction : in # direction: in or out
#ytick.direction : in # direction: in or out
Hope it helps.
Mathieu.
On Tue, Aug 26, 2008 at 11:35 PM, Uri Laserson <las...@mi...> wrote:
> Hi,
>
> Is it possible to create tick marks that go outwards (i.e., point towards
> the label) rather than inwards?
>
> Thanks!
> Uri
>
>
> --
> Uri Laserson
> PhD Candidate, Biomedical Engineering
> Harvard Medical School (Genetics)
> Massachusetts Institute of Technology (Mathematics)
> phone +1 917 742 8019
> las...@mi...
>
> -------------------------------------------------------------------------
> 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: sa6113 <s.p...@gm...> - 2008年08月27日 06:54:22
Dear All,
how can I set more color and font for my plot, as I know matplotlib just
supporte 8 color strings and five fonts.
Is there any way to extend it for all color and font from system ?
has every one any useful code about that?
Thanks
-- 
View this message in context: http://www.nabble.com/set-font-and-color-problem-tp19175632p19175632.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Uri L. <las...@mi...> - 2008年08月27日 02:35:19
Hi,
Is it possible to create plots that only have a single x-axis on the bottom
and a single y-axis on the left, while suppressing an upper or right axis
(i.e., have the graph be "open")?
Thanks!
Uri
-- 
Uri Laserson
PhD Candidate, Biomedical Engineering
Harvard Medical School (Genetics)
Massachusetts Institute of Technology (Mathematics)
phone +1 917 742 8019
las...@mi...
From: Uri L. <las...@mi...> - 2008年08月27日 02:35:07
Hi,
Is it possible to create tick marks that go outwards (i.e., point towards
the label) rather than inwards?
Thanks!
Uri
-- 
Uri Laserson
PhD Candidate, Biomedical Engineering
Harvard Medical School (Genetics)
Massachusetts Institute of Technology (Mathematics)
phone +1 917 742 8019
las...@mi...
From: Mathieu L. <co...@ma...> - 2008年08月27日 02:12:16
On Mon, Aug 25, 2008 at 7:17 PM, Michael Droettboom <md...@st...> wrote:
> Thanks for spotting this. I don't think a lot of us ever use non-English
> locales, so that's fallen through the cracks.
>
> backend_svg.py was using '%s' to convert floats, to limit the number of
> digits written to the file. This works fine with regular floats (since they
> do not follow the locale unless explicitly asked to do so), but numpy arrays
> seem to always follow the locale. (Not certain whether that inconsistency
> could be considered a bug in Numpy).
>
> In any case, I've committed a workaround to matplotlib, which unfortunately
> results in slightly larger SVG files. This is now fixed in SVN r6049. Look
> there for a patch if you just want to fix your local backend_svg.py.
>
Thanks for your lightspeed fix submit ! I patched it and it works fine.
Mathieu.
> Cheers,
> Mike
>
> Mathieu Leplatre wrote:
>>
>> Hi,
>>
>> If I change the locale using cairo backend, the result is fine.
>> But with SVG backend, every objects collapse on top-left corner.
>>
>> As you can see here :
>> http://mathieu-leplatre.info/media/matplotlib-svg/localechange-svg.svg
>>
>> I exported it to png with inkscape to reveal objects outside of frame :
>> http://mathieu-leplatre.info/media/matplotlib-svg/localechange-svg.png
>>
>> Cairo output is fine :
>> http://mathieu-leplatre.info/media/matplotlib-svg/localechange-cairo.svg
>>
>> I guess it's not a unicode problem, since the strings have no
>> non-ascii characters.
>>
>> The code is quite straightforward, it allows me to choose the date
>> language for the formatters.
>> Let me know if I should fill a bug report.
>> Thank you all !
>>
>> ----
>> import locale, matplotlib
>> from datetime import datetime
>> matplotlib.use('svg')
>> import pylab, numpy
>>
>> locale.setlocale(locale.LC_ALL, 'fr_FR.UTF-8')
>> today = datetime.today().strftime("%A")
>>
>> pylab.title( today )
>> pylab.plot( range(10), numpy.random.randn( 10 ))
>> pylab.savefig('localechange-%s' % matplotlib.get_backend())
>> ----
>>
>> -------------------------------------------------------------------------
>> 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
>
>

Showing 11 results of 11

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