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






Showing 10 results of 10

From: Eric F. <ef...@ha...> - 2009年05月30日 23:46:44
John Hunter wrote:
> On Sat, May 30, 2009 at 11:52 AM, Eric Firing <ef...@ha...> wrote:
> 
>> No, that applies to the axis ticks but not to the readout, and I think it is
>> the latter that Xavier is concerned with--at least that is what I have been
>> talking about, and want to improve.
> 
> Just to clarify -- by "readout" do you mean the toolbar strings?
> 
> At first I was assuming that since the toolbar formatting picks up the
> tick Formatter to format the strings, and ScalarFormatter uses
> rcParams['axes.formatter.limits'] to determine when to fall over to
> scientific notation, that this setting would be picked up by the
> toolbar. The reason it does not is because ScalarFormatter overrides
> Formatter.format_data_short, which is what the toolbar uses via
> Axes.format_xdata/format_ydata, and ScalarFormatter.format_data_short
> does not use the formatter.limits setting. Are we at least on the
> same page now? If so, is it advisable/possible to make
> format_data_short respect the formatter.limits setting so Xavier can
> customize it to his heart's content.
Possible, but I think there is a much better solution along the lines I 
suggested earlier. I have it partly implemented. To really do it right 
will require a little bit of work on all the interactive backends; it 
might be very little and very easy. It prompted my question starting 
another thread as to whether we can drop support for GTK < 2.4 so as to 
simplify that backend.
Eric
> 
> JDH
> 
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
> is a gathering of tech-side developers & brand creativity professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, & 
> iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Xavier G. <xav...@gm...> - 2009年05月30日 20:54:45
John Hunter wrote:
> On Sat, May 30, 2009 at 11:52 AM, Eric Firing <ef...@ha...> wrote:
>
> 
>> No, that applies to the axis ticks but not to the readout, and I think it is
>> the latter that Xavier is concerned with--at least that is what I have been
>> talking about, and want to improve.
>> 
>
> Just to clarify -- by "readout" do you mean the toolbar strings?
>
> At first I was assuming that since the toolbar formatting picks up the
> tick Formatter to format the strings, and ScalarFormatter uses
> rcParams['axes.formatter.limits'] to determine when to fall over to
> scientific notation, that this setting would be picked up by the
> toolbar. The reason it does not is because ScalarFormatter overrides
> Formatter.format_data_short, which is what the toolbar uses via
> Axes.format_xdata/format_ydata, and ScalarFormatter.format_data_short
> does not use the formatter.limits setting. Are we at least on the
> same page now? If so, is it advisable/possible to make
> format_data_short respect the formatter.limits setting so Xavier can
> customize it to his heart's content.
>
> JDH
> 
...and this way my brain and my heart would be fully satisfied :)
Please perform this change ;)
Xavier
From: Krishna B. <kri...@gm...> - 2009年05月30日 18:58:55
Hi,
Given that the values of ordinates are changing monotonically, I found that
in some cases, stineman interpolation is monotonic even when the slopes are
not monotonic. And in other cases, it overshoots. Like in the following one:
x = (0, 10, 70, 100)
y = (0, 535, 595, 1000)
xx = arange(0,100,1)
yy = stineman_interp(xx,x,y,yp=None)
plot(x,y,'x')
plot(xx,yy)
Are there some factors that can make the interpolation monotonic, when the
slopes are not monotonic? or does it depend on case by case basis?
From: John H. <jd...@gm...> - 2009年05月30日 18:03:44
On Sat, May 30, 2009 at 11:52 AM, Eric Firing <ef...@ha...> wrote:
> No, that applies to the axis ticks but not to the readout, and I think it is
> the latter that Xavier is concerned with--at least that is what I have been
> talking about, and want to improve.
Just to clarify -- by "readout" do you mean the toolbar strings?
At first I was assuming that since the toolbar formatting picks up the
tick Formatter to format the strings, and ScalarFormatter uses
rcParams['axes.formatter.limits'] to determine when to fall over to
scientific notation, that this setting would be picked up by the
toolbar. The reason it does not is because ScalarFormatter overrides
Formatter.format_data_short, which is what the toolbar uses via
Axes.format_xdata/format_ydata, and ScalarFormatter.format_data_short
does not use the formatter.limits setting. Are we at least on the
same page now? If so, is it advisable/possible to make
format_data_short respect the formatter.limits setting so Xavier can
customize it to his heart's content.
JDH
From: Eric F. <ef...@ha...> - 2009年05月30日 16:52:16
John Hunter wrote:
> On Sat, May 30, 2009 at 2:49 AM, Xavier Gnata <xav...@gm...> wrote:
> 
>> ok. My bad! Sorry.
>> I have changed the default to %1.4g so that is matches my usecases *but* I
>> agree that correct way to improve it in not that trivial...
> 
> 
> You can control the point at which mpl falls over to scientific
> notation. From the matplotlibrc file (see
> http://matplotlib.sourceforge.net/users/customizing.html)
> 
> axes.formatter.limits : -7, 7 # use scientific notation if log10
> # of the axis range is smaller than the
> # first or larger than the second
> 
> I'm actually surprised you are seeing problems with images of
> 1000x1000 -- it makes me suspect you have an older matplotlib version
> or an older matplotlibrc laying around because at -7,7, which is the
> current default, you should not see exponential formatting until you
> get to much larger sizes.
> 
> JDH
John,
No, that applies to the axis ticks but not to the readout, and I think 
it is the latter that Xavier is concerned with--at least that is what I 
have been talking about, and want to improve.
Eric
From: John H. <jd...@gm...> - 2009年05月30日 11:57:18
On Sat, May 30, 2009 at 3:50 AM, Paul Anton Letnes
<pau...@gm...> wrote:
> Hello again,
>
>
> I can set the figure size and font size, that all works fine. However,
> the legend is prohibitively large: for a plot 3 inches wide (why
> doesn't matplotlib use centimeters or similar?), the legend takes up
> about one third of the plot. This does not look too good...
Please post a complete example. As for inches vs cm, that is my fault
-- I can't remember if it was for matlab compatibility, or due to my
provincial ways this side of the pond.
JDH
From: John H. <jd...@gm...> - 2009年05月30日 11:53:24
On Sat, May 30, 2009 at 2:49 AM, Xavier Gnata <xav...@gm...> wrote:
> ok. My bad! Sorry.
> I have changed the default to %1.4g so that is matches my usecases *but* I
> agree that correct way to improve it in not that trivial...
You can control the point at which mpl falls over to scientific
notation. From the matplotlibrc file (see
http://matplotlib.sourceforge.net/users/customizing.html)
axes.formatter.limits : -7, 7 # use scientific notation if log10
 # of the axis range is smaller than the
 # first or larger than the second
I'm actually surprised you are seeing problems with images of
1000x1000 -- it makes me suspect you have an older matplotlib version
or an older matplotlibrc laying around because at -7,7, which is the
current default, you should not see exponential formatting until you
get to much larger sizes.
JDH
From: Paul A. L. <pau...@gm...> - 2009年05月30日 08:51:00
Hello again,
I can set the figure size and font size, that all works fine. However, 
the legend is prohibitively large: for a plot 3 inches wide (why 
doesn't matplotlib use centimeters or similar?), the legend takes up 
about one third of the plot. This does not look too good...
cheers,
Paul
On 29. mai. 2009, at 17.38, Damon McDougall wrote:
> Hi Paul,
>
> You could set the figure size and font size in inches of your plot 
> in matplotlib to be the same as that of the physical size it will 
> appear on paper. That way, all your axes labels and plot text will 
> be the same size as the text in your latex document.
>
> Is this what you want?
> Regards,
> --Damon
>
> On 29 May 2009, at 16:25, Paul Anton Letnes wrote:
>
>> Howdy y'all!
>>
>> I'm trying to make a publication quality plot for a two-column latex
>> article. I'm using latex for text processing, so the plot quality
>> itself is impeccable. However, as I scale the plot size down, the
>> legend becomes extremely large compared to the plot itself. Has
>> anyone solved this problem in a good manner? I'm not willing to make
>> do without the legend.
>>
>> cheers,
>> Paul.
>>
>>
>> ------------------------------------------------------------------------------
>> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
>> is a gathering of tech-side developers & brand creativity 
>> professionals. Meet
>> the minds behind Google Creative Lab, Visual Complexity, 
>> Processing, &
>> iPhoneDevCamp as they present alongside digital heavyweights like 
>> Barbarian
>> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Xavier G. <xav...@gm...> - 2009年05月30日 07:50:45
Eric Firing wrote:
> Xavier Gnata wrote:
>>
>>>
>>>>
>
>>> Right now, the default is very simple:
>>>
>>> def format_data_short(self,value):
>>> 'return a short formatted string representation of a number'
>>> return '%1.3g'%value
>>>
>>> It looks like changing it to something like "%-12g" would facilitate 
>>> considerable improvement in reducing the jumping around of the 
>>> numbers, as well as in providing much more precision. I think that 
>>> 12 is the max number of characters in g conversion. Or maybe it is 
>>> 13; I might not have tested negative numbers.
>>>
>>> The problem is that then it crowds out the other part of the 
>>> message, the pan/zoom status notification etc.
>>>
>>> Breaking the message into two lines almost works (so far only 
>>> checking with gtkagg), but the plot gets resized depending on 
>>> whether there is a status or not.
>>>
>>> I think that with some more fiddling around with that part of the 
>>> toolbar--probably including breaking the message up into separate 
>>> messages for status and readout, and maybe making the readout use 
>>> two lines and always be present--we could make the readout and 
>>> status display much nicer. I have never liked the way it jumps around.
>>>
>> I also agree.
>> However, I would like to be sure I understand one point correctly:
>> As long as x<1000, the default format *is* an integer (at least when 
>> imshow(M) is used).
>
> No. Try
>
> imshow(rand(4,4))
>
> There is nothing special about imshow that makes the cursor readout an 
> integer, nor should there be.
>
> Again, the present default is "%1.3g". I think we can and will do 
> better, but it is not necessarily trivial.
>
> Eric
>
ok. My bad! Sorry.
I have changed the default to %1.4g so that is matches my usecases *but* 
I agree that correct way to improve it in not that trivial...
Xavier
From: Eric F. <ef...@ha...> - 2009年05月30日 02:33:02
Xavier Gnata wrote:
> 
>>
>>>
>> Right now, the default is very simple:
>>
>> def format_data_short(self,value):
>> 'return a short formatted string representation of a number'
>> return '%1.3g'%value
>>
>> It looks like changing it to something like "%-12g" would facilitate 
>> considerable improvement in reducing the jumping around of the 
>> numbers, as well as in providing much more precision. I think that 12 
>> is the max number of characters in g conversion. Or maybe it is 13; I 
>> might not have tested negative numbers.
>>
>> The problem is that then it crowds out the other part of the message, 
>> the pan/zoom status notification etc.
>>
>> Breaking the message into two lines almost works (so far only checking 
>> with gtkagg), but the plot gets resized depending on whether there is 
>> a status or not.
>>
>> I think that with some more fiddling around with that part of the 
>> toolbar--probably including breaking the message up into separate 
>> messages for status and readout, and maybe making the readout use two 
>> lines and always be present--we could make the readout and status 
>> display much nicer. I have never liked the way it jumps around.
>>
> I also agree.
> However, I would like to be sure I understand one point correctly:
> As long as x<1000, the default format *is* an integer (at least when 
> imshow(M) is used).
No. Try
imshow(rand(4,4))
There is nothing special about imshow that makes the cursor readout an 
integer, nor should there be.
Again, the present default is "%1.3g". I think we can and will do 
better, but it is not necessarily trivial.
Eric

Showing 10 results of 10

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