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






Showing results of 276

<< < 1 2 3 4 5 .. 12 > >> (Page 3 of 12)
From: Jeffrey M. <jm...@gm...> - 2012年09月25日 18:32:05
Attachments: pareto.png
ax1.set_ylim(0, sum(data))
ax2.set_ylim(0, 100)
seems to solve both of these issues.
On Tue, Sep 25, 2012 at 11:16 AM, Paul Tremblay <pau...@gm...> wrote:
> There are two problems with this chart:
>
> 1. The scale is wrong. Imagine that you can stack all the bars on top of
> each other. When stacked, all the bars should fill in the graph exactly. In
> other words: ax1.set_ylim = sum(defects). See my original, or the wiki page.
>
> 2. The line starts in the middle of the bar. It needs to start on top, in
> the middle.
>
> Maybe there is a way to correct 1 & 2 with your method, but I can't seem to
> find it.
>
> Thanks!
>
> Paul
>
>
> On Tue, Sep 25, 2012 at 12:58 PM, Jeffrey Melloy <jm...@gm...> wrote:
>>
>> I think pareto charts are supposed to be percentages, not totals.
>>
>> data = [83, 38, 7, 5, 5, 4, 4, 2, 1]
>> labels = ["Vertical", "Horizontal", "Upper", "Lower", "Left", "Right",
>> "Behind", "Front", "Down"]
>> colors = ["#001499", "#ff7f00", "#9440ed", "#edc240", "#238c3f",
>> "#a60085", "#00cca3", "#464f8c", "#005947", "#00004d",
>> "#cc0052", "#591616", "#7d8060", "#299da6", "#9c8fbf",
>> "#4c132a", "#8c3f23", "#85cc33", "#607980", "#7c30bf", "#bf9360",
>> "#324d13", "#13394d", "#4c1659", "#b25f00", "#99cca7",
>> "#669ccc", "#594358"]
>>
>> fig, ax1 = plt.subplots()
>> ax2 = ax1.twinx()
>>
>> for i, d in enumerate(data):
>> ax1.bar(i + .25, d, .5, zorder=0, alpha=0.5, label = labels[i],
>> color=colors[i % len(colors)])
>>
>> percent = [d*1.0/sum(data) * 100 for d in np.cumsum(data)]
>> ax2.plot(np.arange(len(data)) + 0.5, percent, linestyle='-',
>> color='k', linewidth=2, zorder=5)
>>
>> ax1.set_xticks(np.arange(len(data)) + 0.5)
>> ax1.set_xticklabels(labels, rotation=30, ha='right')
>> #ax1.legend()
>>
>> ax1.set_ylabel('Defects')
>> ax2.set_ylabel('Percentage')
>> ax2.set_ylim(0,110)
>>
>> plt.show()
>>
>>
>> On Mon, Sep 24, 2012 at 11:43 PM, Paul Hobson <pmh...@gm...> wrote:
>> >> On Mon, Sep 24, 2012 at 12:21 AM, Paul Tremblay
>> >> <pau...@gm...>
>> >> wrote:
>> >>>
>> >>> Here is my example of a Pareto chart.
>> >>>
>> >>> For an explanation of a Pareto chart:
>> >>>
>> >>> http://en.wikipedia.org/wiki/Pareto_chart
>> >>>
>> >>> Could I get this chart added to the matplolib gallery?
>> >>>
>> >>>
>> >>> Thanks
>> >>>
>> >>> Paul
>> >>>
>> >
>> >> On 9/24/12 4:40 PM, Benjamin Root wrote:
>> >> Your code looks overly complicated. You shouldn't have to be doing the
>> >> connection to the ylim_changed event, I don't think. I think your main
>> >> problem is that you are calling ax1.plot instead of ax2.plot.
>> >>
>> >> I am not against adding more examples to the gallery, but this would
>> >> have to
>> >> be cleaned up before it gets included.
>> >>
>> >> Ben Root
>> >
>> > On Mon, Sep 24, 2012 at 5:50 PM, Paul Tremblay <pau...@gm...>
>> > wrote:
>> >> I took my example from the matplotlib pages itself:
>> >>
>> >> http://matplotlib.org/examples/api/fahrenheit_celcius_scales.html
>> >>
>> >> If you know a better way, please show me.
>> >>
>> >> P.
>> >
>> > Paul,
>> >
>> > That example is an overly complicated template for making a pareto
>> > chart.
>> >
>> > Here's how I'd do it:
>> >
>> > # data
>> > defects = [0, 32, 22, 15, 5, 2]
>> > labels = ['', 'vertical', 'horizontal', 'behind', 'left area', 'other']
>> >
>> > # axes
>> > fig, ax1 = plt.subplots()
>> > ax2 = ax1.twinx()
>> >
>> > # plotting
>> > ax1.bar(np.arange(len(defects))-0.4, defects, zorder=0, alpha=0.5)
>> > ax2.plot(np.cumsum(defects), linestyle='-', color='k', linewidth=2,
>> > zorder=5)
>> >
>> > # formatting
>> > ax1.set_xticks(np.arange(len(defects)))
>> > ax1.set_xticklabels(labels)
>> > ax1.set_ylabel('Defects')
>> > ax2.set_ylabel('Percentage')
>> > plt.show()
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Live Security Virtual Conference
>> > Exclusive live event will cover all the ways today's security and
>> > threat landscape has changed and how IT managers can respond.
>> > Discussions
>> > will include endpoint security, mobile security and the latest in
>> > malware
>> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> > _______________________________________________
>> > Matplotlib-users mailing list
>> > Mat...@li...
>> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Paul T. <pau...@gm...> - 2012年09月25日 18:16:14
There are two problems with this chart:
1. The scale is wrong. Imagine that you can stack all the bars on top of
each other. When stacked, all the bars should fill in the graph exactly. In
other words: ax1.set_ylim = sum(defects). See my original, or the wiki page.
2. The line starts in the middle of the bar. It needs to start on top, in
the middle.
Maybe there is a way to correct 1 & 2 with your method, but I can't seem
to find it.
Thanks!
Paul
On Tue, Sep 25, 2012 at 12:58 PM, Jeffrey Melloy <jm...@gm...> wrote:
> I think pareto charts are supposed to be percentages, not totals.
>
> data = [83, 38, 7, 5, 5, 4, 4, 2, 1]
> labels = ["Vertical", "Horizontal", "Upper", "Lower", "Left", "Right",
> "Behind", "Front", "Down"]
> colors = ["#001499", "#ff7f00", "#9440ed", "#edc240", "#238c3f",
> "#a60085", "#00cca3", "#464f8c", "#005947", "#00004d",
> "#cc0052", "#591616", "#7d8060", "#299da6", "#9c8fbf",
> "#4c132a", "#8c3f23", "#85cc33", "#607980", "#7c30bf", "#bf9360",
> "#324d13", "#13394d", "#4c1659", "#b25f00", "#99cca7",
> "#669ccc", "#594358"]
>
> fig, ax1 = plt.subplots()
> ax2 = ax1.twinx()
>
> for i, d in enumerate(data):
> ax1.bar(i + .25, d, .5, zorder=0, alpha=0.5, label = labels[i],
> color=colors[i % len(colors)])
>
> percent = [d*1.0/sum(data) * 100 for d in np.cumsum(data)]
> ax2.plot(np.arange(len(data)) + 0.5, percent, linestyle='-',
> color='k', linewidth=2, zorder=5)
>
> ax1.set_xticks(np.arange(len(data)) + 0.5)
> ax1.set_xticklabels(labels, rotation=30, ha='right')
> #ax1.legend()
>
> ax1.set_ylabel('Defects')
> ax2.set_ylabel('Percentage')
> ax2.set_ylim(0,110)
>
> plt.show()
>
>
> On Mon, Sep 24, 2012 at 11:43 PM, Paul Hobson <pmh...@gm...> wrote:
> >> On Mon, Sep 24, 2012 at 12:21 AM, Paul Tremblay <
> pau...@gm...>
> >> wrote:
> >>>
> >>> Here is my example of a Pareto chart.
> >>>
> >>> For an explanation of a Pareto chart:
> >>>
> >>> http://en.wikipedia.org/wiki/Pareto_chart
> >>>
> >>> Could I get this chart added to the matplolib gallery?
> >>>
> >>>
> >>> Thanks
> >>>
> >>> Paul
> >>>
> >
> >> On 9/24/12 4:40 PM, Benjamin Root wrote:
> >> Your code looks overly complicated. You shouldn't have to be doing the
> >> connection to the ylim_changed event, I don't think. I think your main
> >> problem is that you are calling ax1.plot instead of ax2.plot.
> >>
> >> I am not against adding more examples to the gallery, but this would
> have to
> >> be cleaned up before it gets included.
> >>
> >> Ben Root
> >
> > On Mon, Sep 24, 2012 at 5:50 PM, Paul Tremblay <pau...@gm...>
> wrote:
> >> I took my example from the matplotlib pages itself:
> >>
> >> http://matplotlib.org/examples/api/fahrenheit_celcius_scales.html
> >>
> >> If you know a better way, please show me.
> >>
> >> P.
> >
> > Paul,
> >
> > That example is an overly complicated template for making a pareto chart.
> >
> > Here's how I'd do it:
> >
> > # data
> > defects = [0, 32, 22, 15, 5, 2]
> > labels = ['', 'vertical', 'horizontal', 'behind', 'left area', 'other']
> >
> > # axes
> > fig, ax1 = plt.subplots()
> > ax2 = ax1.twinx()
> >
> > # plotting
> > ax1.bar(np.arange(len(defects))-0.4, defects, zorder=0, alpha=0.5)
> > ax2.plot(np.cumsum(defects), linestyle='-', color='k', linewidth=2,
> zorder=5)
> >
> > # formatting
> > ax1.set_xticks(np.arange(len(defects)))
> > ax1.set_xticklabels(labels)
> > ax1.set_ylabel('Defects')
> > ax2.set_ylabel('Percentage')
> > plt.show()
> >
> >
> ------------------------------------------------------------------------------
> > Live Security Virtual Conference
> > Exclusive live event will cover all the ways today's security and
> > threat landscape has changed and how IT managers can respond. Discussions
> > will include endpoint security, mobile security and the latest in malware
> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Michael D. <md...@st...> - 2012年09月25日 18:05:33
Those *.afm fonts are only available in the postscript backend when 
"ps.usecorefonts" is set to True. Otherwise, you have to use 
TrueType/OpenType fonts.
Mike
On 09/25/2012 12:11 PM, Steven Boada wrote:
> Hey Mike
>
> $ fc-match Helvetica
> n019003l.pfb: "Nimbus Sans L" "Regular"
>
>
> Perhaps I don't have the fonts installed...
>
> In my matplotlib/mpl-data/fonts/ I have the following fonts installed...
>
> in ttf/
>
> cmb10.ttf RELEASENOTES.TXT STIXSizFourSymBol.ttf VeraIt.ttf
> cmex10.ttf STIXGeneralBolIta.ttf STIXSizFourSymReg.ttf VeraMoBd.ttf
> cmmi10.ttf STIXGeneralBol.ttf STIXSizOneSymBol.ttf VeraMoBI.ttf
> cmr10.ttf STIXGeneralItalic.ttf STIXSizOneSymReg.ttf VeraMoIt.ttf
> cmss10.ttf STIXGeneral.ttf STIXSizThreeSymBol.ttf VeraMono.ttf
> cmsy10.ttf STIXNonUniBolIta.ttf STIXSizThreeSymReg.ttf VeraSeBd.ttf
> cmtt10.ttf STIXNonUniBol.ttf STIXSizTwoSymBol.ttf VeraSe.ttf
> COPYRIGHT.TXT STIXNonUniIta.ttf STIXSizTwoSymReg.ttf Vera.ttf
> LICENSE_STIX STIXNonUni.ttf VeraBd.ttf
> README.TXT STIXSizFiveSymReg.ttf VeraBI.ttf
>
> and in pdfcorefonts
>
> Courier.afm Helvetica-Bold.afm Times-Bold.afm
> Courier-Bold.afm Helvetica-BoldOblique.afm Times-BoldItalic.afm
> Courier-BoldOblique.afm Helvetica-Oblique.afm Times-Italic.afm
> Courier-Oblique.afm readme.txt Times-Roman.afm
> Helvetica.afm Symbol.afm ZapfDingbats.afm
>
>
> Which does include some Helvetica fonts. And the font that I am trying
> to use doesn't *have* to be helvetica. I just like that font, so I was
> playing with it.
>
> Steven
>
>
> On 9/25/12 10:41 AM, Michael Droettboom wrote:
>> Do you have a font installed called Helvetica? That's pretty rare these
>> days... most systems have one of the many Helvetica clones instead.
>>
>> Does "fc-match Helvetica" (at the commandline) return anything?
>>
>> Mike
>>
>> On 09/25/2012 10:05 AM, Steven Boada wrote:
>>> List,
>>>
>>> I am trying, with little success, to change the fonts on my plots. It
>>> seems like a simple thing to do, but I can't seem to make it work.
>>>
>>> First, here is the relevant section of my Matplotlibrc file:
>>>
>>> backend : GTKAgg
>>>
>>> font.family : sans-serif
>>> font.style : normal
>>> font.weight : medium
>>> font.sans-serif : Helvetica
>>>
>>> (I copied this from the Matplotlibrc documentation page)
>>>
>>>
>>> Now if I make a plot, and put some labels on there... (just using ipython)
>>>
>>> In [3]: figure()
>>> Out[3]: <matplotlib.figure.Figure at 0x2acb950>
>>>
>>> In [4]: xlabel('Hz',fontsize=20)
>>> Out[4]: <matplotlib.text.Text at 0x2ae3510>
>>>
>>> In [5]:
>>> /opt/python/lib/python2.7/site-packages/matplotlib/font_manager.py:1216:
>>> UserWarning: findfont: Font family ['sans-serif'] not found. Falling
>>> back to Bitstream Vera Sans
>>> (prop.get_family(), self.defaultFamily[fontext]))
>>>
>>>
>>> I get this over and over and over again. I have deleted everything in my
>>> ~/.matplotlib folder. That is, I have deleted all of the font caches...
>>> I can't come up with anything else. The internet seems to thing that
>>> just deleting the caches will fix everything. In my case it doesn't.
>>>
>>> I get this problem on both my mac, and my Ubuntu Linux 12.04 machine.
>>>
>>> Thanks!
>>>
>>> Steven
>>>
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond. Discussions
>>> will include endpoint security, mobile security and the latest in malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
From: Jeffrey M. <jm...@gm...> - 2012年09月25日 16:58:50
I think pareto charts are supposed to be percentages, not totals.
data = [83, 38, 7, 5, 5, 4, 4, 2, 1]
labels = ["Vertical", "Horizontal", "Upper", "Lower", "Left", "Right",
"Behind", "Front", "Down"]
colors = ["#001499", "#ff7f00", "#9440ed", "#edc240", "#238c3f",
"#a60085", "#00cca3", "#464f8c", "#005947", "#00004d",
 "#cc0052", "#591616", "#7d8060", "#299da6", "#9c8fbf",
"#4c132a", "#8c3f23", "#85cc33", "#607980", "#7c30bf", "#bf9360",
 "#324d13", "#13394d", "#4c1659", "#b25f00", "#99cca7",
"#669ccc", "#594358"]
fig, ax1 = plt.subplots()
ax2 = ax1.twinx()
for i, d in enumerate(data):
 ax1.bar(i + .25, d, .5, zorder=0, alpha=0.5, label = labels[i],
color=colors[i % len(colors)])
percent = [d*1.0/sum(data) * 100 for d in np.cumsum(data)]
ax2.plot(np.arange(len(data)) + 0.5, percent, linestyle='-',
color='k', linewidth=2, zorder=5)
ax1.set_xticks(np.arange(len(data)) + 0.5)
ax1.set_xticklabels(labels, rotation=30, ha='right')
#ax1.legend()
ax1.set_ylabel('Defects')
ax2.set_ylabel('Percentage')
ax2.set_ylim(0,110)
plt.show()
On Mon, Sep 24, 2012 at 11:43 PM, Paul Hobson <pmh...@gm...> wrote:
>> On Mon, Sep 24, 2012 at 12:21 AM, Paul Tremblay <pau...@gm...>
>> wrote:
>>>
>>> Here is my example of a Pareto chart.
>>>
>>> For an explanation of a Pareto chart:
>>>
>>> http://en.wikipedia.org/wiki/Pareto_chart
>>>
>>> Could I get this chart added to the matplolib gallery?
>>>
>>>
>>> Thanks
>>>
>>> Paul
>>>
>
>> On 9/24/12 4:40 PM, Benjamin Root wrote:
>> Your code looks overly complicated. You shouldn't have to be doing the
>> connection to the ylim_changed event, I don't think. I think your main
>> problem is that you are calling ax1.plot instead of ax2.plot.
>>
>> I am not against adding more examples to the gallery, but this would have to
>> be cleaned up before it gets included.
>>
>> Ben Root
>
> On Mon, Sep 24, 2012 at 5:50 PM, Paul Tremblay <pau...@gm...> wrote:
>> I took my example from the matplotlib pages itself:
>>
>> http://matplotlib.org/examples/api/fahrenheit_celcius_scales.html
>>
>> If you know a better way, please show me.
>>
>> P.
>
> Paul,
>
> That example is an overly complicated template for making a pareto chart.
>
> Here's how I'd do it:
>
> # data
> defects = [0, 32, 22, 15, 5, 2]
> labels = ['', 'vertical', 'horizontal', 'behind', 'left area', 'other']
>
> # axes
> fig, ax1 = plt.subplots()
> ax2 = ax1.twinx()
>
> # plotting
> ax1.bar(np.arange(len(defects))-0.4, defects, zorder=0, alpha=0.5)
> ax2.plot(np.cumsum(defects), linestyle='-', color='k', linewidth=2, zorder=5)
>
> # formatting
> ax1.set_xticks(np.arange(len(defects)))
> ax1.set_xticklabels(labels)
> ax1.set_ylabel('Defects')
> ax2.set_ylabel('Percentage')
> plt.show()
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Steven B. <bo...@ph...> - 2012年09月25日 16:24:28
Hey Mike
$ fc-match Helvetica
n019003l.pfb: "Nimbus Sans L" "Regular"
Perhaps I don't have the fonts installed...
In my matplotlib/mpl-data/fonts/ I have the following fonts installed...
in ttf/
cmb10.ttf RELEASENOTES.TXT STIXSizFourSymBol.ttf VeraIt.ttf
cmex10.ttf STIXGeneralBolIta.ttf STIXSizFourSymReg.ttf VeraMoBd.ttf
cmmi10.ttf STIXGeneralBol.ttf STIXSizOneSymBol.ttf VeraMoBI.ttf
cmr10.ttf STIXGeneralItalic.ttf STIXSizOneSymReg.ttf VeraMoIt.ttf
cmss10.ttf STIXGeneral.ttf STIXSizThreeSymBol.ttf VeraMono.ttf
cmsy10.ttf STIXNonUniBolIta.ttf STIXSizThreeSymReg.ttf VeraSeBd.ttf
cmtt10.ttf STIXNonUniBol.ttf STIXSizTwoSymBol.ttf VeraSe.ttf
COPYRIGHT.TXT STIXNonUniIta.ttf STIXSizTwoSymReg.ttf Vera.ttf
LICENSE_STIX STIXNonUni.ttf VeraBd.ttf
README.TXT STIXSizFiveSymReg.ttf VeraBI.ttf
and in pdfcorefonts
Courier.afm Helvetica-Bold.afm Times-Bold.afm
Courier-Bold.afm Helvetica-BoldOblique.afm Times-BoldItalic.afm
Courier-BoldOblique.afm Helvetica-Oblique.afm Times-Italic.afm
Courier-Oblique.afm readme.txt Times-Roman.afm
Helvetica.afm Symbol.afm ZapfDingbats.afm
Which does include some Helvetica fonts. And the font that I am trying 
to use doesn't *have* to be helvetica. I just like that font, so I was 
playing with it.
Steven
On 9/25/12 10:41 AM, Michael Droettboom wrote:
> Do you have a font installed called Helvetica? That's pretty rare these
> days... most systems have one of the many Helvetica clones instead.
>
> Does "fc-match Helvetica" (at the commandline) return anything?
>
> Mike
>
> On 09/25/2012 10:05 AM, Steven Boada wrote:
>> List,
>>
>> I am trying, with little success, to change the fonts on my plots. It
>> seems like a simple thing to do, but I can't seem to make it work.
>>
>> First, here is the relevant section of my Matplotlibrc file:
>>
>> backend : GTKAgg
>>
>> font.family : sans-serif
>> font.style : normal
>> font.weight : medium
>> font.sans-serif : Helvetica
>>
>> (I copied this from the Matplotlibrc documentation page)
>>
>>
>> Now if I make a plot, and put some labels on there... (just using ipython)
>>
>> In [3]: figure()
>> Out[3]: <matplotlib.figure.Figure at 0x2acb950>
>>
>> In [4]: xlabel('Hz',fontsize=20)
>> Out[4]: <matplotlib.text.Text at 0x2ae3510>
>>
>> In [5]:
>> /opt/python/lib/python2.7/site-packages/matplotlib/font_manager.py:1216:
>> UserWarning: findfont: Font family ['sans-serif'] not found. Falling
>> back to Bitstream Vera Sans
>> (prop.get_family(), self.defaultFamily[fontext]))
>>
>>
>> I get this over and over and over again. I have deleted everything in my
>> ~/.matplotlib folder. That is, I have deleted all of the font caches...
>> I can't come up with anything else. The internet seems to thing that
>> just deleting the caches will fix everything. In my case it doesn't.
>>
>> I get this problem on both my mac, and my Ubuntu Linux 12.04 machine.
>>
>> Thanks!
>>
>> Steven
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
-- 
Steven Boada
Doctoral Student
Dept of Physics and Astronomy
Texas A&M University
bo...@ph...
From: Michael D. <md...@st...> - 2012年09月25日 15:41:59
Do you have a font installed called Helvetica? That's pretty rare these 
days... most systems have one of the many Helvetica clones instead.
Does "fc-match Helvetica" (at the commandline) return anything?
Mike
On 09/25/2012 10:05 AM, Steven Boada wrote:
> List,
>
> I am trying, with little success, to change the fonts on my plots. It
> seems like a simple thing to do, but I can't seem to make it work.
>
> First, here is the relevant section of my Matplotlibrc file:
>
> backend : GTKAgg
>
> font.family : sans-serif
> font.style : normal
> font.weight : medium
> font.sans-serif : Helvetica
>
> (I copied this from the Matplotlibrc documentation page)
>
>
> Now if I make a plot, and put some labels on there... (just using ipython)
>
> In [3]: figure()
> Out[3]: <matplotlib.figure.Figure at 0x2acb950>
>
> In [4]: xlabel('Hz',fontsize=20)
> Out[4]: <matplotlib.text.Text at 0x2ae3510>
>
> In [5]:
> /opt/python/lib/python2.7/site-packages/matplotlib/font_manager.py:1216:
> UserWarning: findfont: Font family ['sans-serif'] not found. Falling
> back to Bitstream Vera Sans
> (prop.get_family(), self.defaultFamily[fontext]))
>
>
> I get this over and over and over again. I have deleted everything in my
> ~/.matplotlib folder. That is, I have deleted all of the font caches...
> I can't come up with anything else. The internet seems to thing that
> just deleting the caches will fix everything. In my case it doesn't.
>
> I get this problem on both my mac, and my Ubuntu Linux 12.04 machine.
>
> Thanks!
>
> Steven
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Steven B. <bo...@ph...> - 2012年09月25日 14:40:25
List,
I am trying, with little success, to change the fonts on my plots. It 
seems like a simple thing to do, but I can't seem to make it work.
First, here is the relevant section of my Matplotlibrc file:
backend : GTKAgg
font.family : sans-serif
font.style : normal
font.weight : medium
font.sans-serif : Helvetica
(I copied this from the Matplotlibrc documentation page)
Now if I make a plot, and put some labels on there... (just using ipython)
In [3]: figure()
Out[3]: <matplotlib.figure.Figure at 0x2acb950>
In [4]: xlabel('Hz',fontsize=20)
Out[4]: <matplotlib.text.Text at 0x2ae3510>
In [5]: 
/opt/python/lib/python2.7/site-packages/matplotlib/font_manager.py:1216: 
UserWarning: findfont: Font family ['sans-serif'] not found. Falling 
back to Bitstream Vera Sans
 (prop.get_family(), self.defaultFamily[fontext]))
I get this over and over and over again. I have deleted everything in my 
~/.matplotlib folder. That is, I have deleted all of the font caches... 
I can't come up with anything else. The internet seems to thing that 
just deleting the caches will fix everything. In my case it doesn't.
I get this problem on both my mac, and my Ubuntu Linux 12.04 machine.
Thanks!
Steven
From: Michael D. <md...@st...> - 2012年09月25日 13:01:23
This is working for me, even with text.usetex set to "False". What 
version of matplotlib are you using? Do you have anything set in your 
matplotlibrc file?
Mike
On 09/25/2012 06:10 AM, andreasl wrote:
> Hello,
>
> When I use something along the lines of
>
> legend( (r'0ドル.5^x/x!$', r'1ドル^x/x!$') )
>
> for some reason omegas are drawn instead of the ! sign. I can't find 
> an alternative here <http://matplotlib.org/users/mathtext.html> nor 
> elsewhere. Any ideas?
>
> Many thanks,
>
> Andreas
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: mdekauwe <mde...@gm...> - 2012年09月25日 12:53:51
I tried your suggestions...the first one (Qt4Agg) resulted in an error
(below) so it looks like I am missing some packages and the second option
(TkAgg) pretty much gave the same quality as the macosx backend.
thanks.
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/pyplot.py",
line 95, in <module>
 new_figure_manager, draw_if_interactive, _show = pylab_setup()
 File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/__init__.py",
line 25, in pylab_setup
 globals(),locals(),[backend_name])
 File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py",
line 12, in <module>
 from backend_qt4 import QtCore, QtGui, FigureManagerQT, FigureCanvasQT,\
 File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_qt4.py",
line 23, in <module>
 from qt4_compat import QtCore, QtGui, _getSaveFileName, __version__
 File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/qt4_compat.py",
line 36, in <module>
 import sip
ImportError: No module named sip
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/resolution-on-plotting-for-retina-displays-tp39068p39071.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: andreasl <and...@la...> - 2012年09月25日 12:51:03
On 25/09/12 11:44, Damon McDougall wrote:
> On Tue, Sep 25, 2012 at 11:10 AM, andreasl <and...@la...> wrote:
>> Hello,
>>
>> When I use something along the lines of
>>
>> legend( (r'0ドル.5^x/x!$', r'1ドル^x/x!$') )
>>
>> for some reason omegas are drawn instead of the ! sign. I can't find an
>> alternative here nor elsewhere. Any ideas?
>>
> Looks fine to me. Do you have rcParams['text.usetex']=True?
>
Thanks Damon. No, I was using matplotlib's own mathtex 
<http://matplotlib.org/users/mathtext.html> rather than direct LaTeX 
support <http://matplotlib.org/users/usetex.html>. If I do set usetex to 
True, trying to plot anything results in errors, the output including:
! LaTeX Error: File `type1cm.sty' not found.
This issue is mentioned 
<http://matplotlib.org/users/usetex.html#possible-hangups> on the 
matplotlib webpage (I am using Ubuntu-derived Mint). I'm not keen to 
install type1cm as part of Mint's space-chomping 485MB 
texlive-latex-extra package. May figure out how to install it 
individually; if anyone has experience with this, please shout. Cheers.
From: Benjamin R. <ben...@ou...> - 2012年09月25日 12:45:53
On Tue, Sep 25, 2012 at 8:14 AM, mdekauwe <mde...@gm...> wrote:
> Hi,
>
> For all those using newer macs [and I assume other newer computers] the
> resolution on the plt.show popup window is a little rough (not sure of the
> technical name). Is there a way to double up the resolution? I tried
> changing a few things but none of them seemed to make much difference. Does
> anyone know specifically what I would need to change?
>
> thanks,
>
> Martin.
>
>
>
My understanding is that what gets displayed is always at the native
resolution. I would assume you are using the macosx backend, so maybe you
are running into a limitation with it? Can you try to see if the problem
exists with the Qt4Agg or TkAgg backends?
Cheers!
Ben Root
From: mdekauwe <mde...@gm...> - 2012年09月25日 12:14:19
Hi,
For all those using newer macs [and I assume other newer computers] the
resolution on the plt.show popup window is a little rough (not sure of the
technical name). Is there a way to double up the resolution? I tried
changing a few things but none of them seemed to make much difference. Does
anyone know specifically what I would need to change?
thanks,
Martin.
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/resolution-on-plotting-for-retina-displays-tp39068.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Damon M. <dam...@gm...> - 2012年09月25日 10:44:24
On Tue, Sep 25, 2012 at 11:10 AM, andreasl <and...@la...> wrote:
> Hello,
>
> When I use something along the lines of
>
> legend( (r'0ドル.5^x/x!$', r'1ドル^x/x!$') )
>
> for some reason omegas are drawn instead of the ! sign. I can't find an
> alternative here nor elsewhere. Any ideas?
>
Looks fine to me. Do you have rcParams['text.usetex']=True?
-- 
Damon McDougall
http://www.damon-is-a-geek.com
B2.39
Mathematics Institute
University of Warwick
Coventry
West Midlands
CV4 7AL
United Kingdom
From: andreasl <and...@la...> - 2012年09月25日 10:10:53
Hello,
When I use something along the lines of
legend( (r'0ドル.5^x/x!$', r'1ドル^x/x!$') )
for some reason omegas are drawn instead of the ! sign. I can't find an 
alternative here <http://matplotlib.org/users/mathtext.html> nor 
elsewhere. Any ideas?
Many thanks,
Andreas
From: Paul H. <pmh...@gm...> - 2012年09月25日 06:43:21
> On Mon, Sep 24, 2012 at 12:21 AM, Paul Tremblay <pau...@gm...>
> wrote:
>>
>> Here is my example of a Pareto chart.
>>
>> For an explanation of a Pareto chart:
>>
>> http://en.wikipedia.org/wiki/Pareto_chart
>>
>> Could I get this chart added to the matplolib gallery?
>>
>>
>> Thanks
>>
>> Paul
>>
> On 9/24/12 4:40 PM, Benjamin Root wrote:
> Your code looks overly complicated. You shouldn't have to be doing the
> connection to the ylim_changed event, I don't think. I think your main
> problem is that you are calling ax1.plot instead of ax2.plot.
>
> I am not against adding more examples to the gallery, but this would have to
> be cleaned up before it gets included.
>
> Ben Root
On Mon, Sep 24, 2012 at 5:50 PM, Paul Tremblay <pau...@gm...> wrote:
> I took my example from the matplotlib pages itself:
>
> http://matplotlib.org/examples/api/fahrenheit_celcius_scales.html
>
> If you know a better way, please show me.
>
> P.
Paul,
That example is an overly complicated template for making a pareto chart.
Here's how I'd do it:
# data
defects = [0, 32, 22, 15, 5, 2]
labels = ['', 'vertical', 'horizontal', 'behind', 'left area', 'other']
# axes
fig, ax1 = plt.subplots()
ax2 = ax1.twinx()
# plotting
ax1.bar(np.arange(len(defects))-0.4, defects, zorder=0, alpha=0.5)
ax2.plot(np.cumsum(defects), linestyle='-', color='k', linewidth=2, zorder=5)
# formatting
ax1.set_xticks(np.arange(len(defects)))
ax1.set_xticklabels(labels)
ax1.set_ylabel('Defects')
ax2.set_ylabel('Percentage')
plt.show()
From: Paul T. <pau...@gm...> - 2012年09月25日 02:48:10
By the way, I had done the chart differently to begin with. But this code
requires more lines, more imports, and is more complex. (Without
plt.gca().yaxis or the formatter, the graph will not come out.)
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.ticker import FuncFormatter
from matplotlib.ticker import MaxNLocator
defects = [32, 22, 15, 5, 2]
labels = ['vertical', 'horizontal', 'behind', 'left area', 'other']
the_sum = sum(defects)
the_cumsum = np.cumsum(defects)
ind = np.arange(len(defects))
width = .98
x = ind + .5 * width
fig = plt.figure()
ax1 = fig.add_subplot(111)
ax2 = ax1.twinx()
rects = ax1.bar(ind, defects, width=width)
ax1.set_ylim(ymax=the_sum)
ax2.set_ylim(ymax=the_sum)
plt.gca().yaxis.set_major_locator( MaxNLocator(nbins = 6) )
line, = ax2.plot(x, the_cumsum)
ax1.set_xticks(ind+ .5 * width)
ax1.set_xticklabels(labels)
def to_percent(x, pos):
 return round(x/the_sum, 1) * 100
formatter = FuncFormatter(to_percent)
ax2.yaxis.set_major_formatter(formatter)
ax1.set_ylabel('Defects')
ax2.set_ylabel('Percentage')
plt.show()
On Mon, Sep 24, 2012 at 8:50 PM, Paul Tremblay <pau...@gm...>wrote:
> I took my example from the matplotlib pages itself:
>
> http://matplotlib.org/examples/api/fahrenheit_celcius_scales.html
>
> If you know a better way, please show me.
>
> P.
>
>
> On 9/24/12 4:40 PM, Benjamin Root wrote:
>
>
>
> On Mon, Sep 24, 2012 at 12:21 AM, Paul Tremblay <pau...@gm...>wrote:
>
>> Here is my example of a Pareto chart.
>>
>> For an explanation of a Pareto chart:
>>
>> http://en.wikipedia.org/wiki/Pareto_chart
>>
>> Could I get this chart added to the matplolib gallery?
>>
>>
>> Thanks
>>
>> Paul
>>
>>
> Your code looks overly complicated. You shouldn't have to be doing the
> connection to the ylim_changed event, I don't think. I think your main
> problem is that you are calling ax1.plot instead of ax2.plot.
>
> I am not against adding more examples to the gallery, but this would have
> to be cleaned up before it gets included.
>
> Ben Root
>
>
>
From: Paul T. <pau...@gm...> - 2012年09月25日 00:50:23
I took my example from the matplotlib pages itself:
http://matplotlib.org/examples/api/fahrenheit_celcius_scales.html
If you know a better way, please show me.
P.
On 9/24/12 4:40 PM, Benjamin Root wrote:
>
>
> On Mon, Sep 24, 2012 at 12:21 AM, Paul Tremblay 
> <pau...@gm... <mailto:pau...@gm...>> wrote:
>
> Here is my example of a Pareto chart.
>
> For an explanation of a Pareto chart:
>
> http://en.wikipedia.org/wiki/Pareto_chart
>
> Could I get this chart added to the matplolib gallery?
>
>
> Thanks
>
> Paul
>
>
> Your code looks overly complicated. You shouldn't have to be doing 
> the connection to the ylim_changed event, I don't think. I think your 
> main problem is that you are calling ax1.plot instead of ax2.plot.
>
> I am not against adding more examples to the gallery, but this would 
> have to be cleaned up before it gets included.
>
> Ben Root
>
From: Christoph G. <cg...@uc...> - 2012年09月25日 00:50:16
On 9/24/2012 3:32 PM, David Honcik wrote:
> I've run into a large memory leak using Matplotlib with PySide and the
> Qt4 back end. I'm using :
> Python 3.2
> Numpy 1.6.2
> Pyside 1.1.1 (qt474)
> Matplotlib 1.2 (first the Capetown Group port to Python 3, then 1.2 RC2)
> on Windows XP 32 bit
> I've tried using the Python 2.7 branch of all of the above and don't see
> the problem. I don't see the problem with the Tk back end. I don't see
> the problem with the Qt4 back end and PyQt4. Only with the above
> mentioned versions and using the Qt4 back end with PySide.
> The following script will reproduce the problem :
> --------------------
> import matplotlib
> matplotlib.use('Qt4Agg')
> matplotlib.rcParams['backend.qt4']='PySide'
> import pylab
> arrayX = []
> arrayY = []
> for nIndex in range(0, 100):
> arrayX.append(nIndex)
> arrayY.append(nIndex)
> Figure = matplotlib.pyplot.figure(1)
> Axes = Figure.add_axes([ 0.05, 0.05, 0.95, 0.95])
> Axes.plot(arrayX,
> arrayY,
> color = "blue",
> marker = "o",
> markersize = 5.0)
> Axes.set_xlim(arrayX[0], arrayX[len(arrayX) - 1])
> Axes.set_ylim(arrayY[0], arrayY[len(arrayY) - 1])
> matplotlib.pyplot.show()
> --------------------
> I run the above, grab the lower right sizing handle on the plot window
> and start resizing the window. Watching the python process in task
> manager, each resize leaks a noticeable amount of memory. A few minutes
> of this will get process memory up to ~2.5 GB. At that point it crashes.
> I'm new here, am I in the right place?
>
I can reproduce this exactly, also with pyside 1.1.2 and an empty plot. 
Looks like QtGui.QImage is leaking.
import matplotlib
matplotlib.use('Qt4Agg')
matplotlib.rcParams['backend.qt4']='PySide'
from matplotlib import pyplot
pyplot.plot()
pyplot.show()
--
Christoph
From: Martin M. <mmo...@fo...> - 2012年09月25日 00:34:34
Hi Ben,
Benjamin Root wrote:
> 
> 
> On Monday, September 24, 2012, Martin Mokrejs wrote:
> 
> Hi,
> I have pie charts with relatively long texts assigned to each slice of the pie.
> The text is drawn horizontally. Instead, I would like to have it rotated at the
> same angle as the slice itself (i.e. centered at the "axis" of the slice). In this
> way the text would not overlap other text of adjacent slices (or at least if the
> text starts far enough from the pie).
> 
> The example below is a bit over-twisted but I really want to be able to read at
> least a portion of those ['my text4', 'my text5', 'my text6', 'my text7'] legends.
> 
> 
> Hmmm, this might be a decent feature to add to pie(). Although, I wonder if a legend would better suit your needs?
The problem is that some of my pie charts have dozens of slices or very varying width.
The legend would take just too much space and moreover, there is not that many colors
easily distinguishable by eye so a person would have a hard time to find which item in
the legend corresponds to some slice in the chart.
I think this is the only way out. ;-)
Martin
BTW: A percentage in black color on a blue slice is hardly readable. Could pie() also
change a font foreground color if the background is too dark in those few slices? Say
to white? ;-))
From: Benjamin R. <ben...@ou...> - 2012年09月25日 00:23:53
On Monday, September 24, 2012, Martin Mokrejs wrote:
> Hi,
> I have pie charts with relatively long texts assigned to each slice of
> the pie.
> The text is drawn horizontally. Instead, I would like to have it rotated
> at the
> same angle as the slice itself (i.e. centered at the "axis" of the slice).
> In this
> way the text would not overlap other text of adjacent slices (or at least
> if the
> text starts far enough from the pie).
>
> The example below is a bit over-twisted but I really want to be able to
> read at
> least a portion of those ['my text4', 'my text5', 'my text6', 'my text7']
> legends.
>
>
Hmmm, this might be a decent feature to add to pie(). Although, I wonder
if a legend would better suit your needs?
Ben Root
From: Martin M. <mmo...@fo...> - 2012年09月24日 23:37:27
Hi,
 I have pie charts with relatively long texts assigned to each slice of the pie.
The text is drawn horizontally. Instead, I would like to have it rotated at the
same angle as the slice itself (i.e. centered at the "axis" of the slice). In this
way the text would not overlap other text of adjacent slices (or at least if the
text starts far enough from the pie).
The example below is a bit over-twisted but I really want to be able to read at
least a portion of those ['my text4', 'my text5', 'my text6', 'my text7'] legends.
import pylab
F = pylab.gcf()
F.set_size_inches(17, 17)
ax_pie = pylab.axes([0.30, 0.30, 0.4, 0.4])
_data = [0.17, 0.23, 0.599, 0.001, 0.003, 0.003, 0.003]
_colors=['red', 'green', 'blue', 'black', 'white', 'yellow', 'violet']
_labels=['my text1', 'my text2', 'my text3', 'my text4', 'my text5', 'my text6', 'my text7']
ax_pie.pie(_data, colors=_colors, labels=_labels, labeldistance=1.5, autopct='%1.1f%%')
pylab.axis('equal')
pylab.title("blah")
pylab.show()
 I tried to search for some example of this or documentation of the pie function
but it seems it is either not possible or not documented. ;-)
Some relatively close matches I found:
http://matplotlib.sourceforge.net/examples/pylab_examples/text_rotation.html (this
could maybe help but I do not know at what angle is each slice rendered by pylab.pie())
http://matplotlib.sourceforge.net/examples/pylab_examples/text_rotation_relative_to_line.html
(maybe this would work if all text should be drawn at a SAME angle but that is not what I want)
Some other shots:
http://stackoverflow.com/questions/9220933/plotting-a-pie-chart-in-matplotlib-at-a-specific-angle-with-the-fracs-on-the-wed
http://guutaranoheya.web.fc2.com/math/matplotlib_ex.html (search for "rotation")
Thank you for your help,
Martin
From: David H. <Ho...@ge...> - 2012年09月24日 22:32:56
I've run into a large memory leak using Matplotlib with PySide and the
Qt4 back end. I'm using :
 
Python 3.2
Numpy 1.6.2
Pyside 1.1.1 (qt474)
Matplotlib 1.2 (first the Capetown Group port to Python 3, then 1.2 RC2)
 
on Windows XP 32 bit
 
 
I've tried using the Python 2.7 branch of all of the above and don't see
the problem. I don't see the problem with the Tk back end. I don't see
the problem with the Qt4 back end and PyQt4. Only with the above
mentioned versions and using the Qt4 back end with PySide.
 
The following script will reproduce the problem :
 
--------------------
import matplotlib
 
matplotlib.use('Qt4Agg')
matplotlib.rcParams['backend.qt4']='PySide'
import pylab
 
arrayX = []
arrayY = []
for nIndex in range(0, 100):
 arrayX.append(nIndex)
 arrayY.append(nIndex)
 
Figure = matplotlib.pyplot.figure(1)
Axes = Figure.add_axes([ 0.05, 0.05, 0.95, 0.95])
 
Axes.plot(arrayX,
 arrayY,
 color = "blue",
 marker = "o",
 markersize = 5.0)
 
Axes.set_xlim(arrayX[0], arrayX[len(arrayX) - 1])
Axes.set_ylim(arrayY[0], arrayY[len(arrayY) - 1])
 
matplotlib.pyplot.show()
--------------------
 
I run the above, grab the lower right sizing handle on the plot window
and start resizing the window. Watching the python process in task
manager, each resize leaks a noticeable amount of memory. A few minutes
of this will get process memory up to ~2.5 GB. At that point it
crashes.
 
I'm new here, am I in the right place?
From: Benjamin R. <ben...@ou...> - 2012年09月24日 20:41:20
On Mon, Sep 24, 2012 at 12:21 AM, Paul Tremblay <pau...@gm...>wrote:
> Here is my example of a Pareto chart.
>
> For an explanation of a Pareto chart:
>
> http://en.wikipedia.org/wiki/Pareto_chart
>
> Could I get this chart added to the matplolib gallery?
>
>
> Thanks
>
> Paul
>
>
Your code looks overly complicated. You shouldn't have to be doing the
connection to the ylim_changed event, I don't think. I think your main
problem is that you are calling ax1.plot instead of ax2.plot.
I am not against adding more examples to the gallery, but this would have
to be cleaned up before it gets included.
Ben Root
From: Scott H. <st...@co...> - 2012年09月24日 19:24:08
I'd like to use the same patch to clip two images that share the same 
axes, and extract values from the un-clipped region of both arrays. 
Unfortunately this seems harder than expected. Code & questions below, 
Thanks!
from matplotlib.patches import Polygon
import matplotlib.pyplot as plt
from numpy import random
poly = patches.Circle((5,5), radius=3, fill=False, ec='none')
fig = plt.figure()
ax = fig.add_subplot(121)
ax.autoscale_view(0,0,0)
test = random.rand(10,10)
im = ax.imshow(test)
test1 = random.rand(10,10)
# How to prevent automatic axis scaling?
ax1 = fig.add_subplot(122, sharex=ax, sharey=ax)
im1 = ax1.imshow(test1)
ax.add_patch(poly)
im.set_clip_path(poly)
# Doesn't work b/c poly vertices auto-transformed to display coords by 
add_patch?
ax1.add_patch(poly)
im1.set_clip_path(poly)
# How to extract non-clipped values instead of full array?
clipped_data = im.get_array()
plt.show()
From: Michael D. <md...@st...> - 2012年09月24日 17:31:57
matplotlib 1.2.0rc2 is available!
This is the culmination of many months of hard work. 1.2.0 is the first 
release to support Python 3.x, and drops support for Python 2.5 and 
earlier. A more detailed list of changes is available here:
http://matplotlib.org/1.2.0/users/whats_new.html
For the first time, downloads are being made available through github, 
and not through sourceforge, so the release and binaries can be 
downloaded here:
https://github.com/matplotlib/matplotlib/downloads 
<https://github.com/matplotlib/matplotlib/downloads>
(Due to a compiler difference, we do not have binaries for 32-bit OS-X, 
but we hope to have them available soon.)
Documentation for the new release is available here:
http://matplotlib.org/1.2.0/ 
<http://matplotlib.org/1.2.0/users/whats_new.html>
(The main matplotlib.org site will continue to host the documentation 
for 1.1.1 until the final 1.2.0 release).
Go forth, download, kick the tires, and let us know what breaks! (Either 
here or on the github issue tracker).
Cheers,
Mike

Showing results of 276

<< < 1 2 3 4 5 .. 12 > >> (Page 3 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 によって変換されたページ (->オリジナル) /