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




Showing 4 results of 4

From: Christopher B. <Chr...@no...> - 2006年02月06日 23:29:36
Eric Firing wrote:
>> Which is what we have now, yes?
> 
> Yes, except for the "notes in docstrings and/or elsewhere".
Yes. Notes are always good.
>>> 2) Do it only if the transforms and offsets are such that it does not 
>>> depend on the viewLim; otherwise raise an exception.
>>>
>>> 3) Do a partial job of it also in the case where transData is the 
>>> transform for either of verts of offsets, and simply ignore the 
>>> effect of whichever of these is not using transData.
>>
>> I'd be happy if dataLim was calculated from just the offsets. Is that 
>> option 3? adding option 2 would be fine too, but wouldn't help me any.
> 
> Option 3 includes and extends option 2, and does cover your use case. 
> What it does *not* do is ensure that the result of autoscaling is that 
> you can see everything you are trying to plot. To some extent this is a 
> problem even now; a line marker that happens to land in a corner (such 
> as the origin) doesn't show up very well, because only 1/4 of it is in 
> the plotted domain.
Exactly, and I think that's fine.
> To get around this problem, one could put in yet another rc param that 
> would ensure a margin is added to the viewLim as calculated from the 
> dataLim. So, for example, plot([0,1], [0,1]) would have axis limits 
> from -0.2 to 1.2 (or something like that) instead of 0 to 1, and a big 
> red marker at each point would still be fully within the plotted domain.
I think an rc param is a bad idea. there really is no way to do this in 
the general case, as you have NO idea how big people's markers, etc are 
going to be in data units. I also think it's no big deal to have part of 
a marker chopped off.
> A strategy question, of course, is how much of this sort of 
> sophistication should be built in to the automatic plotting, versus 
> simply available, as is the case now, with manual commands. This 
> concern with excessive complexity is the reason I am not enthusiastic 
> about option 3 (or 2);
I agree. I still vote for my option: just calculate the dataLim from the 
offsets. That's it. It's easy, and it covers the basics.
> getting the right result manually is pretty easy 
> once one knows how to do it. And, chances are, for a final product one 
> would end up using the manual methods anyway so as to have full control.
True, but it would be nice if the defaults gave you dataLims that were 
at least in the ballpark for your data, rather than arbitrary. It'd be 
easier for people to see the plot and think: "I need to tweak the axis 
limits"
Thanks for you work on this.
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
 		
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Eric F. <ef...@ha...> - 2006年02月06日 22:07:46
Chris,
Christopher Barker wrote:
> Eric Firing wrote:
> 
>> I fixed the bug in which ax.cla() was not actually causing the 
>> existing dataLim to be ignored. It did not require an extra flag; it 
>> only required taking advantage of the ignore=-1 option of 
>> dataLim.update. The fixed version is in CVS.
> 
> 
> Wonderful. Thanks.
> 
>> Because collections have verts and offsets, which may have separate 
>> transformations, it is not possible, in general, to convert the 
>> plotted points to data units (which is what we would need) until the 
>> viewLim is set; but that defeats the purpose, which is to update the 
>> dataLim so that it can be used to calculate viewLim.
> 
> 
> 
>> 1) Don't even try. Simply require it to be done manually. Make notes 
>> in docstrings and/or elsewhere.
> 
> 
> Which is what we have now, yes?
Yes, except for the "notes in docstrings and/or elsewhere".
> 
>> 2) Do it only if the transforms and offsets are such that it does not 
>> depend on the viewLim; otherwise raise an exception.
>>
>> 3) Do a partial job of it also in the case where transData is the 
>> transform for either of verts of offsets, and simply ignore the effect 
>> of whichever of these is not using transData.
> 
> 
> I'd be happy if dataLim was calculated from just the offsets. Is that 
> option 3? adding option 2 would be fine too, but wouldn't help me any.
Option 3 includes and extends option 2, and does cover your use case. 
What it does *not* do is ensure that the result of autoscaling is that 
you can see everything you are trying to plot. To some extent this is a 
problem even now; a line marker that happens to land in a corner (such 
as the origin) doesn't show up very well, because only 1/4 of it is in 
the plotted domain.
To get around this problem, one could put in yet another rc param that 
would ensure a margin is added to the viewLim as calculated from the 
dataLim. So, for example, plot([0,1], [0,1]) would have axis limits 
from -0.2 to 1.2 (or something like that) instead of 0 to 1, and a big 
red marker at each point would still be fully within the plotted domain.
A strategy question, of course, is how much of this sort of 
sophistication should be built in to the automatic plotting, versus 
simply available, as is the case now, with manual commands. This 
concern with excessive complexity is the reason I am not enthusiastic 
about option 3 (or 2); getting the right result manually is pretty easy 
once one knows how to do it. And, chances are, for a final product one 
would end up using the manual methods anyway so as to have full control.
> 
> That's because in my case, I'm using a LineCollection to create 
> something kind of like a marker, so the offsets really do define the 
> dataLim. Perhaps that's not universal enough to include, however. It 
> would be easy.
> 
> -Chris
> 
> 
Eric
From: Christopher B. <Chr...@no...> - 2006年02月06日 19:44:20
Eric Firing wrote:
> I fixed the bug in which ax.cla() was not actually causing the existing 
> dataLim to be ignored. It did not require an extra flag; it only 
> required taking advantage of the ignore=-1 option of dataLim.update. The 
> fixed version is in CVS.
Wonderful. Thanks.
> Because collections have verts and offsets, which may have separate 
> transformations, it is not possible, in general, to convert the plotted 
> points to data units (which is what we would need) until the viewLim is 
> set; but that defeats the purpose, which is to update the dataLim so 
> that it can be used to calculate viewLim.
> 1) Don't even try. Simply require it to be done manually. Make notes 
> in docstrings and/or elsewhere.
Which is what we have now, yes?
> 2) Do it only if the transforms and offsets are such that it does not 
> depend on the viewLim; otherwise raise an exception.
> 
> 3) Do a partial job of it also in the case where transData is the 
> transform for either of verts of offsets, and simply ignore the effect 
> of whichever of these is not using transData.
I'd be happy if dataLim was calculated from just the offsets. Is that 
option 3? adding option 2 would be fine too, but wouldn't help me any.
That's because in my case, I'm using a LineCollection to create 
something kind of like a marker, so the offsets really do define the 
dataLim. Perhaps that's not universal enough to include, however. It 
would be easy.
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
 		
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Eric F. <ef...@ha...> - 2006年02月06日 01:10:42
John and Chris,
In reference to my suggestion:
> 1) Use a flag instead of the have_data() method to keep track of
> whether data limit updating needs to start from scratch. Then
> axes.cla() can set the flag, and the update_datalim* functions can
> clear it.
> 
> 2) Add an optional flag to add_collection, telling it to call the
> collection's get_verts method and use the result to update the data
> limits. This would make it easier to use collections in user-level
> code, without imposing any performance penalty for functions like
> contour that handle the data limit updating in a more efficient way.
I fixed the bug in which ax.cla() was not actually causing the existing 
dataLim to be ignored. It did not require an extra flag; it only 
required taking advantage of the ignore=-1 option of dataLim.update. The 
fixed version is in CVS.
I was not able to implement the second part of the strategy, however, 
which was to put an optional flag into axes.add_collection telling it to 
update the dataLim. The reason is quite fundamental, and I think it 
reveals some additional bugs.
Because collections have verts and offsets, which may have separate 
transformations, it is not possible, in general, to convert the plotted 
points to data units (which is what we would need) until the viewLim is 
set; but that defeats the purpose, which is to update the dataLim so 
that it can be used to calculate viewLim.
The related bug is that the collection get_verts() methods all simply 
add the offset to the verts and return the sums, which are quite 
meaningless unless transform and transOffset are identical; and even if 
they are identical, the units of get_verts() will depend on the transform.
Options for adding some automatic dataLim updating option to 
add_collection include:
1) Don't even try. Simply require it to be done manually. Make notes 
in docstrings and/or elsewhere.
2) Do it only if the transforms and offsets are such that it does not 
depend on the viewLim; otherwise raise an exception.
3) Do a partial job of it also in the case where transData is the 
transform for either of verts of offsets, and simply ignore the effect 
of whichever of these is not using transData.
I am leaning towards (1); it is not clear to me that the effort involved 
in the other options would be justified by the convenience gained.
Regarding the bug in get_verts(), the options include:
1) Add bug warnings to the docstrings.
2) Raise an exception if it is not possible to unambiguously determine 
the plotted points in data coordinates.
3) Remove the functions entirely on the grounds that they are 
dangerously misleading.
Most likely I have missed something important in all this.
Eric

Showing 4 results of 4

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