SourceForge logo
SourceForge logo
Menu

matplotlib-devel — matplotlib developers

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
(1)
Nov
(33)
Dec
(20)
2004 Jan
(7)
Feb
(44)
Mar
(51)
Apr
(43)
May
(43)
Jun
(36)
Jul
(61)
Aug
(44)
Sep
(25)
Oct
(82)
Nov
(97)
Dec
(47)
2005 Jan
(77)
Feb
(143)
Mar
(42)
Apr
(31)
May
(93)
Jun
(93)
Jul
(35)
Aug
(78)
Sep
(56)
Oct
(44)
Nov
(72)
Dec
(75)
2006 Jan
(116)
Feb
(99)
Mar
(181)
Apr
(171)
May
(112)
Jun
(86)
Jul
(91)
Aug
(111)
Sep
(77)
Oct
(72)
Nov
(57)
Dec
(51)
2007 Jan
(64)
Feb
(116)
Mar
(70)
Apr
(74)
May
(53)
Jun
(40)
Jul
(519)
Aug
(151)
Sep
(132)
Oct
(74)
Nov
(282)
Dec
(190)
2008 Jan
(141)
Feb
(67)
Mar
(69)
Apr
(96)
May
(227)
Jun
(404)
Jul
(399)
Aug
(96)
Sep
(120)
Oct
(205)
Nov
(126)
Dec
(261)
2009 Jan
(136)
Feb
(136)
Mar
(119)
Apr
(124)
May
(155)
Jun
(98)
Jul
(136)
Aug
(292)
Sep
(174)
Oct
(126)
Nov
(126)
Dec
(79)
2010 Jan
(109)
Feb
(83)
Mar
(139)
Apr
(91)
May
(79)
Jun
(164)
Jul
(184)
Aug
(146)
Sep
(163)
Oct
(128)
Nov
(70)
Dec
(73)
2011 Jan
(235)
Feb
(165)
Mar
(147)
Apr
(86)
May
(74)
Jun
(118)
Jul
(65)
Aug
(75)
Sep
(162)
Oct
(94)
Nov
(48)
Dec
(44)
2012 Jan
(49)
Feb
(40)
Mar
(88)
Apr
(35)
May
(52)
Jun
(69)
Jul
(90)
Aug
(123)
Sep
(112)
Oct
(120)
Nov
(105)
Dec
(116)
2013 Jan
(76)
Feb
(26)
Mar
(78)
Apr
(43)
May
(61)
Jun
(53)
Jul
(147)
Aug
(85)
Sep
(83)
Oct
(122)
Nov
(18)
Dec
(27)
2014 Jan
(58)
Feb
(25)
Mar
(49)
Apr
(17)
May
(29)
Jun
(39)
Jul
(53)
Aug
(52)
Sep
(35)
Oct
(47)
Nov
(110)
Dec
(27)
2015 Jan
(50)
Feb
(93)
Mar
(96)
Apr
(30)
May
(55)
Jun
(83)
Jul
(44)
Aug
(8)
Sep
(5)
Oct
Nov
(1)
Dec
(1)
2016 Jan
Feb
Mar
(1)
Apr
May
Jun
(2)
Jul
Aug
(3)
Sep
(1)
Oct
(3)
Nov
Dec
2017 Jan
Feb
(5)
Mar
Apr
May
Jun
Jul
(3)
Aug
Sep
(7)
Oct
Nov
Dec
2018 Jan
Feb
Mar
Apr
May
Jun
Jul
(2)
Aug
Sep
Oct
Nov
Dec
S M T W T F S



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

Showing 6 results of 6

From: John H. <jdh...@ac...> - 2006年03月14日 18:40:18
>>>>> "Eric" == Eric Firing <ef...@ha...> writes:
 Eric> Here is a simple illustration of the problem and
 Eric> inconsistency, using just the first few points in
 Eric> Tennessee's plot and a few lines from his script. With a
 Eric> log scale for y, the Agg backends are leaving gaps (breaking
 Eric> the line) at the points where y==0; the PS and SVG backends
 Eric> are removing those points, but *not* breaking the line. I
 Eric> think the Agg behavior is much better. But maybe it would
 Eric> be better yet to raise an exception, forcing the user to
 Eric> deal with the error explicitly. For example, the user might
 Eric> want to change the zero values to a very small number, and
 Eric> then explicitly set the y range to exclude the small
 Eric> numbers. This is illustrated in the second subplot.
This issue has a long history, which I'll summarize here. In the old
days, we raised an exception when non-positive numbers were passed to
log plotting. Most people found this objectionable, and prefer to see
the valid points plotted rather than nothing (though a warning would
be nice). This is what matlab does. I needed to make some
architectural changes to support this, because the transformations
happened in the lines class which passed the transformed data to the
backend. 
I looked into filtering the data in the lines class (basically what
you did for ma data) but did not think it would be fast enough,
because we potentially would have had to create a lot of line
segments.
So I changed the backend API and modified draw_lines to take the
transformation as an argument. Then the backend can do the following
(eg _backend_agg)
 if (needNonlinear)
 try {
	mpltransform->nonlinear_only_api(&thisx, &thisy);
 }
 catch (...) {
	moveto = true;
	continue;
 }
Ie if there is a nonlinear transformation that raises an exception,
the path state is changed from lineto to moveto. This is very fast,
at least an order of magnitude faster than trying to compute the
segments at the python level I suspect.
At the same time I introduced some optimizations for marker drawing
with a new backend method called draw_markers that also does the
transformations in the backend. This made marker drawing up to 25
times faster (we used to draw every marker as a separate function call
in lines.py)
We decided to support both old and new style APIs in the "transition
period" which made it easy for other backends to do ..... nothing. So
that is why the other backends haven't implemented this feature yet.
Steve worked on it a bit for Cairo and Darren and I both did for PS
but never got a working product. You can see the attempt in
backend_ps _draw_markers method (underscore hidden) and in
backend_cairo's draw_markers_OLD method. There was extensive
discussion on this list with the API and implementation details so
just search for draw_markers if you are interested.
So the backend is now in what I call a schizophrenic state, in two
ways. 
 1) some backends use the old and some use the "newstyle" API
 2) Even in the newstyle API, some methods do the transformation in
 the front end (draw_rectangle) and some in the backend
 (draw_markers). 
There is a need to simplify, unify and rationalize this API, but since
it mostly works, there has not been a lot of pressure to do so. And
it would break a lot of backends that may not be actively maintained.
A modest short term goal should be to get the newstyle draw_lines and
draw_markers working for the PS backend, both to fix this log problem
and because it is faster and potentially much smaller in terms of PS
file sizes. Something for a rainy day.
JDH
From: Eric F. <ef...@ha...> - 2006年03月14日 18:21:14
Attachments: logplot.py
John Hunter wrote:
>>>>>>"Tennessee" == Tennessee Leeuwenburg <ten...@te...> writes:
> 
> Tennessee> That could certainly explain it.
> 
> Tennessee> I don't know that I agree that it's correct -- I'm not
> Tennessee> graphing log(X), I'm graphing X, and 0 is a valid value
> Tennessee> for it. Only the scale is logarithmic, but it still
> Tennessee> contains a 0. I'll bow to a more expert opinion if
> Tennessee> there's disagreement.
> 
> If you posst your script, we might be able to give a more informed
> opinion of what the desired output should be :-) I understand that
> there are some largish data files that you don't want to post, but if
> we could just read the script alone that might be enough.
> 
> JDH
John,
Here is a simple illustration of the problem and inconsistency, using 
just the first few points in Tennessee's plot and a few lines from his 
script. With a log scale for y, the Agg backends are leaving gaps 
(breaking the line) at the points where y==0; the PS and SVG backends 
are removing those points, but *not* breaking the line. I think the Agg 
behavior is much better. But maybe it would be better yet to raise an 
exception, forcing the user to deal with the error explicitly. For 
example, the user might want to change the zero values to a very small 
number, and then explicitly set the y range to exclude the small 
numbers. This is illustrated in the second subplot.
I haven't looked into it, but I suspect the log(0) values are becoming 
nans, so what we are seeing is differences in nan-handling among the 
backends.
Eric
From: John H. <jdh...@ac...> - 2006年03月14日 14:21:52
>>>>> "Tennessee" == Tennessee Leeuwenburg <ten...@te...> writes:
 Tennessee> That could certainly explain it.
 Tennessee> I don't know that I agree that it's correct -- I'm not
 Tennessee> graphing log(X), I'm graphing X, and 0 is a valid value
 Tennessee> for it. Only the scale is logarithmic, but it still
 Tennessee> contains a 0. I'll bow to a more expert opinion if
 Tennessee> there's disagreement.
If you posst your script, we might be able to give a more informed
opinion of what the desired output should be :-) I understand that
there are some largish data files that you don't want to post, but if
we could just read the script alone that might be enough.
JDH
From: Tennessee L. <ten...@te...> - 2006年03月14日 06:21:58
On Mon, 2006年03月13日 at 20:08 -1000, Eric Firing wrote:
> Tennessee Leeuwenburg wrote:
> > I've sent Eric the files off-list. Anyone else who wants them, let me
> > know. The bundle is about 400Kb -- not huge but not tiny. The script
> > itself is small, it's just the data file and the output images which
> > take up the space.
> > 
> > The .png and onscreen renderer are both missing line segments, and
> > behave in the same way. The .svg renderer behaves as expected.
> > 
> > I'm running a very up-to-date linux, and I installed matplotlib newly
> > about 4 days ago.
> > 
> > Cheers,
> > -T
> 
> Tennessee,
> 
> The first thing I notice is that you are trying to plot with log-log 
> scales, but some of your y values are zero. Log(0) is undefined. The 
> Agg renderers are doing something sensible: leaving out the 0 values. 
> It is actually the ps and svg renderers that are incorrect, in that they 
> seem to be substituting a value of 1 for each zero; they are bridging 
> what *should* be gaps.
> 
> Eric
That could certainly explain it. 
I don't know that I agree that it's correct -- I'm not graphing log(X),
I'm graphing X, and 0 is a valid value for it. Only the scale is
logarithmic, but it still contains a 0. I'll bow to a more expert
opinion if there's disagreement.
Cheers,
-T
From: Eric F. <ef...@ha...> - 2006年03月14日 06:08:14
Tennessee Leeuwenburg wrote:
> I've sent Eric the files off-list. Anyone else who wants them, let me
> know. The bundle is about 400Kb -- not huge but not tiny. The script
> itself is small, it's just the data file and the output images which
> take up the space.
> 
> The .png and onscreen renderer are both missing line segments, and
> behave in the same way. The .svg renderer behaves as expected.
> 
> I'm running a very up-to-date linux, and I installed matplotlib newly
> about 4 days ago.
> 
> Cheers,
> -T
Tennessee,
The first thing I notice is that you are trying to plot with log-log 
scales, but some of your y values are zero. Log(0) is undefined. The 
Agg renderers are doing something sensible: leaving out the 0 values. 
It is actually the ps and svg renderers that are incorrect, in that they 
seem to be substituting a value of 1 for each zero; they are bridging 
what *should* be gaps.
Eric
From: Tennessee L. <ten...@te...> - 2006年03月14日 04:30:38
I've sent Eric the files off-list. Anyone else who wants them, let me
know. The bundle is about 400Kb -- not huge but not tiny. The script
itself is small, it's just the data file and the output images which
take up the space.
The .png and onscreen renderer are both missing line segments, and
behave in the same way. The .svg renderer behaves as expected.
I'm running a very up-to-date linux, and I installed matplotlib newly
about 4 days ago.
Cheers,
-T

Showing 6 results of 6

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