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

Showing 19 results of 19

From: Jeff W. <js...@fa...> - 2007年11月20日 23:46:18
Christopher Barker wrote:
> Jeff,
>
> as you mentioned license as one issue in not using shapely, I thought 
> you might be interested in this:
>
> -------- Original Message --------
> Subject: [Community] Proposal to change Shapely license from LGPL to BSD
> From: Sean Gillies <sgi...@fr...>
>
> I propose that the Shapely license be changed to the 3 clause modified
> BSD used by OWSLib, GeoJSON, Rtree, and WorldMill. I choose LGPL
> orginally to match the GEOS license, but I think consistency across the
> new GIS-Python projects is more important.
> --------
>
>
> As for ctypes vs. pyrex -- I find it ironic that you've chosen pyrex 
> for dependency reasons -- there are lot of folks that using ctypes to 
> asve the hassles of compiliation, particularly on Windows (see 
> geoGjango, for instance). But I guess MPL required compilation anyway.
>
> I'm just poking at this 'cause I'd really like to see as little 
> redundancy of python bindings for stuff as possible. WE alrady have 
> geos bound by ogr, shapely (I think geoDjango), and who knows who else.
>
> Oh well, we all need to do what works best for our needs. I guess it's 
> real credit to tools like swig, ctypes and pyrex (and python itself) 
> that anyone would even consider writing their own bindings to something!
>
> -Chris
>
>
>
Chris: I don't consider the pyrex GEOS interface I created for basemap 
a general-purpose binding - it's limited to the only the functionality 
that basemap needs. The ability of pyrex to do loops in C makes it a 
lot faster than the Shapely ctypes interface though. I have 
corresponded with Sean Gillies about this (and the LGPL licensing 
issue), and as a result I think Shapley 2.0 will be based on Pyrex and 
will have a BSD license. Perhaps then I can switch basemap back to 
using it.
Eric mentioned the fact that ctypes often has a hard time finding the 
shared library to load. I view this as a potential support nightmare 
for matplotlib if we use ctypes to interface with external libs, which 
might be installed anywhere. You can't even tell ctypes where to look - 
it's hard-coded into the Shapely __init__ and there's no way I can see 
to override the search path that ctypes uses.
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Eric F. <ef...@ha...> - 2007年11月20日 23:33:34
Christopher Barker wrote:
[...]
> As for ctypes vs. pyrex -- I find it ironic that you've chosen pyrex for 
> dependency reasons -- there are lot of folks that using ctypes to asve 
> the hassles of compiliation, particularly on Windows (see geoGjango, for 
> instance). But I guess MPL required compilation anyway.
Not just dependency reasons. When I tried to use Jeff's version with 
Shapely, I had to set LD_LIBRARY_PATH=/usr/local/lib for ctypes to find 
my geos library. I couldn't find any cleaner way to do it, and I don't 
consider that acceptable. Is there a clean way to tell ctypes where a 
library is? I was surprised it was not even checking that standard 
location.
Also, pyrex does a *lot* more than ctypes, and I think Jeff will tell 
you he has put that power to good use in his new basemap version.
Eric
From: Christopher B. <Chr...@no...> - 2007年11月20日 23:07:59
Jeff,
as you mentioned license as one issue in not using shapely, I thought 
you might be interested in this:
-------- Original Message --------
Subject: [Community] Proposal to change Shapely license from LGPL to BSD
From: Sean Gillies <sgi...@fr...>
I propose that the Shapely license be changed to the 3 clause modified
BSD used by OWSLib, GeoJSON, Rtree, and WorldMill. I choose LGPL
orginally to match the GEOS license, but I think consistency across the
new GIS-Python projects is more important.
--------
As for ctypes vs. pyrex -- I find it ironic that you've chosen pyrex for 
dependency reasons -- there are lot of folks that using ctypes to asve 
the hassles of compiliation, particularly on Windows (see geoGjango, for 
instance). But I guess MPL required compilation anyway.
I'm just poking at this 'cause I'd really like to see as little 
redundancy of python bindings for stuff as possible. WE alrady have geos 
bound by ogr, shapely (I think geoDjango), and who knows who else.
Oh well, we all need to do what works best for our needs. I guess it's 
real credit to tools like swig, ctypes and pyrex (and python itself) 
that anyone would even consider writing their own bindings to something!
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (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...> - 2007年11月20日 21:41:23
Publishers sometimes require electronic figures as tif or eps, and using 
the cymk color system. We do everything in rgb. I don't understand 
color systems well. What would be needed to give mpl the ability to 
produce files using the cymk system?
Thanks.
Eric
From: John H. <jd...@gm...> - 2007年11月20日 19:31:11
On Nov 20, 2007 11:24 AM, Rob Hetland <he...@ta...> wrote:
> 2007年11月20日 18:13:23.074 Python[24184] *** _NSAutoreleaseNoPool():
> Object 0x409e190 of class NSCarbonWindowContentView autoreleased with
> no pool in place - just leaking
I googled this message and found this:
http://www.cocoabuilder.com/archive/message/cocoa/2004/6/25/110592
I think we are going to need some help from a cocoa person.... I CCd
Charlie, who did some of the work on the cocoa agg backend...
JDH
From: Michael D. <md...@st...> - 2007年11月20日 18:21:28
I'm not sure that this consumes enough cycles to warrant the additional 
complexity of doing things differently on a per-backend basis (the 
choice to stick with 8-bit colors would have to be made higher than the 
backend to see any savings). The pcolor images are an exception, since 
that code is common to all backends -- we can do whatever works best.
To see what the "upper limit" on the performance increase would be, I 
modified draw_quad_mesh in the Agg backend so that it doesn't look up or 
multiply colors at all (it just uses a hard-coded 8-bit black always), 
and on the included pcolormesh benchmark, there was no significant 
difference (I ran each 3 times, since the difference is so small):
trunk:
	5.518 fps
	5.530 fps
	5.530 fps
trunk (hard-coded color):
	5.507 fps
	5.567 fps
	5.302 fps
I did notice, however, that draw_quad_mesh makes an unnecessary 
temporary buffer to convert the floating-point colors to 8-bit color. 
Since each color is only converted once, it is slightly faster to do the 
conversion on the fly and avoid the heap alloc/dealloc.
trunk (no alloc):
	5.630 fps
	5.618 fps
	5.617 fps
Cheers,
Mike
Eric Firing wrote:
> Michael Droettboom wrote:
>> I think I'm a little confused by the question. From the Python
>> perspective, everything in the Agg backend takes floats. Agg
>> actually has color types for both floating point and 8-bit-per-plane
>> colors, though obviously it's converted to 8-bit-per-plane
>> eventually. But, of course, that is done on the fly without much
>> memory copying, so I'm quite surprised that the speed up is
>> significant... Where exactly is this conversion happening, and how
>> are you now avoiding it? (Is this in code that is not checked in,
>> perhaps?)
> 
> I was referring to _image.cpp and the quadmesh code in _backend_agg.cpp. 
> Both work directly with agg::rgba8, and can benefit from doing a color 
> table lookup directly in 8-bit space instead of using floats and then 
> converting.
> 
> Eric
> 
>>
>> As for the other backends, it's a mixed bag. PDF, PS and Cairo want
>> floats, SVG wants ints. Personally, I just *like* floats better, as
>> it feels more future proof, even though most people aren't using the
>> extra color resolution now. (Of course, if your plot relies on
>> high-resolution color, you probably need to rethink your plot
>> anyway... ;)
>>
>> Cheers, Mike
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Eric F. <ef...@ha...> - 2007年11月20日 18:09:06
Michael Droettboom wrote:
> It made my merge from trunk to branch a little harder than it had to be, 
> too.
> 
> I understand the drive for this, but there is that downside as well.
John, Mike,
Yes, I understand, and I am sorry--but I hope it is one-time pain to 
avoid continuing pin-pricks. If svn ignored trailing whitespace, then 
there would be no problem; I could continue to use an editor that 
removes it, and you could continue to use editors that gratuitously add 
it, and usually it would make no difference. This is not the case, 
however. As it is now, if a file comes into svn without any trailing 
whitespace, and one of you loads it up, maybe makes a trivial change 
after running your cursor through it, and saves it--it will end up with 
a big changeset--lots of trailing whitespace. This is just plain bad. 
All downside, no upside.
Eric
> 
> Cheers,
> Mike
> 
> John Hunter wrote:
>> On Nov 18, 2007 10:10 PM, Jarrod Millman <mi...@be...> wrote:
>>> On Nov 18, 2007 11:33 AM, Eric Firing <ef...@ha...> wrote:
>>>> Trailing whitespace introduces noise--sometimes a *lot* of noise--into
>>>> svn changesets. I would very much appreciate it if everyone would try
>>>> to eliminate trailing whitespace before committing any changes to svn.
>>>> (And also eliminate hard tabs--I haven't seen many new ones creeping 
>>>> in,
>>>> but continuing vigilence is appreciated.)
>>
>> While I'm happy to play along ( I configured my emacs to detect
>> whitespace) and suspect I may have been a trailing whitespace
>> contributer, I fear this may be a case where the cure is worse than
>> the disease. As we all make commits to fix the trailing whitespaces,
>> since they are now glaringly ugly in my emacs buffer, I fear we will
>> see significantly more changesets which are whitespace only, than if
>> we simply configured our editors to ignore them.
>>
>> JDH
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2005.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Matplotlib-devel mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
> 
From: Michael D. <md...@st...> - 2007年11月20日 17:41:10
It made my merge from trunk to branch a little harder than it had to be, 
too.
I understand the drive for this, but there is that downside as well.
Cheers,
Mike
John Hunter wrote:
> On Nov 18, 2007 10:10 PM, Jarrod Millman <mi...@be...> wrote:
>> On Nov 18, 2007 11:33 AM, Eric Firing <ef...@ha...> wrote:
>>> Trailing whitespace introduces noise--sometimes a *lot* of noise--into
>>> svn changesets. I would very much appreciate it if everyone would try
>>> to eliminate trailing whitespace before committing any changes to svn.
>>> (And also eliminate hard tabs--I haven't seen many new ones creeping in,
>>> but continuing vigilence is appreciated.)
> 
> While I'm happy to play along ( I configured my emacs to detect
> whitespace) and suspect I may have been a trailing whitespace
> contributer, I fear this may be a case where the cure is worse than
> the disease. As we all make commits to fix the trailing whitespaces,
> since they are now glaringly ugly in my emacs buffer, I fear we will
> see significantly more changesets which are whitespace only, than if
> we simply configured our editors to ignore them.
> 
> JDH
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Rob H. <he...@ta...> - 2007年11月20日 17:24:21
On Nov 20, 2007, at 5:09 PM, John Hunter wrote:
> Are you on this box now to verify the problem? There was a bug in
> keypress_demo, because the demo was using 'g' to turn the grid on and
> off and the default key interaction was doing the same, resulting in a
> double toggle and no change. I fixed this bug in svn. I looked
> through the diffs from r3393 to present and cannot find anything which
> explains the difference.
>
> I'm assuming that some of the other key events (eg press 'x' when
> panning to constrain the zoom to the x axis) are also failing. And
> you have the window focus (click on the subplot) when testing...
So I re-installed from the latest SVN, and can re-confirm that 
keypress events do not work. I also noticed that this error message 
shows up (the one you allude to above):
2007年11月20日 18:13:23.074 Python[24184] *** _NSAutoreleaseNoPool(): 
Object 0x409e190 of class NSCarbonWindowContentView autoreleased with 
no pool in place - just leaking
This error message does _not_ appear when I revert back to the 
2007年11月7日 version where keypress events work. I am not sure if they 
are related, but it seems likely. This error shows up when a figure 
is created (I used ipython and debug-annoying, as the error does not 
appear in a debug log):
 >>> figure()
FigureCanvasAgg.draw
RendererAgg.__init__
RendererAgg.__init__ width=640.0, height=480.0
RendererAgg.__init__ _RendererAgg done
RendererAgg.__init__ done
2007年11月20日 18:21:32.073 Python[24293] *** _NSAutoreleaseNoPool(): 
Object 0x180822b0 of class NSCarbonWindowContentView autoreleased 
with no pool in place - just leaking
FigureCanvasAgg.draw
RendererAgg.__init__
RendererAgg.__init__ width=654.0, height=494.0
RendererAgg.__init__ _RendererAgg done
RendererAgg.__init__ done
 <matplotlib.figure.Figure instance at 0x18618e40>
 >>>
-Rob
----
Rob Hetland, Associate Professor
Dept. of Oceanography, Texas A&M University
http://pong.tamu.edu/~rob
phone: 979-458-0096, fax: 979-845-6331
From: John H. <jd...@gm...> - 2007年11月20日 17:18:16
On Nov 18, 2007 10:10 PM, Jarrod Millman <mi...@be...> wrote:
>
> On Nov 18, 2007 11:33 AM, Eric Firing <ef...@ha...> wrote:
> > Trailing whitespace introduces noise--sometimes a *lot* of noise--into
> > svn changesets. I would very much appreciate it if everyone would try
> > to eliminate trailing whitespace before committing any changes to svn.
> > (And also eliminate hard tabs--I haven't seen many new ones creeping in,
> > but continuing vigilence is appreciated.)
While I'm happy to play along ( I configured my emacs to detect
whitespace) and suspect I may have been a trailing whitespace
contributer, I fear this may be a case where the cure is worse than
the disease. As we all make commits to fix the trailing whitespaces,
since they are now glaringly ugly in my emacs buffer, I fear we will
see significantly more changesets which are whitespace only, than if
we simply configured our editors to ignore them.
JDH
From: John H. <jd...@gm...> - 2007年11月20日 16:09:18
On Nov 20, 2007 9:15 AM, Rob Hetland <he...@ta...> wrote:
>
> On Nov 20, 2007, at 3:12 PM, John Hunter wrote:
> I am using Mac OS X 10.4.11, python 2.5, and svn versions of numpy
> and mpl. I use Tk/Tcl 8.4.7 that (if I remember right) came with the
> OS. I did not use the simple_plot, but I did try the 'g' trick on a
> normal plot, and tried to run the keypress_demo. So, although I
> didn't do _exactly_ what you are doing, it is essentially the same.
Are you on this box now to verify the problem? There was a bug in
keypress_demo, because the demo was using 'g' to turn the grid on and
off and the default key interaction was doing the same, resulting in a
double toggle and no change. I fixed this bug in svn. I looked
through the diffs from r3393 to present and cannot find anything which
explains the difference.
I'm assuming that some of the other key events (eg press 'x' when
panning to constrain the zoom to the x axis) are also failing. And
you have the window focus (click on the subplot) when testing...
JDH
From: Rob H. <he...@ta...> - 2007年11月20日 15:17:19
On Nov 20, 2007, at 3:12 PM, John Hunter wrote:
> I am using tkagg with svn and key events are working. Just to make
> sure we are doing exactly the same thing, I am running
> examples/simple_plot.py with -dTkAgg and clicking in the subplot area
> and then pressing 'g' to toggle the grid on and off. Does this not
> work for you. In your earlier post, you mentioned something about
> carbon. Can you give some more details on your exact environment?
I am using Mac OS X 10.4.11, python 2.5, and svn versions of numpy 
and mpl. I use Tk/Tcl 8.4.7 that (if I remember right) came with the 
OS. I did not use the simple_plot, but I did try the 'g' trick on a 
normal plot, and tried to run the keypress_demo. So, although I 
didn't do _exactly_ what you are doing, it is essentially the same.
I am using Rev: 3393 (Last Changed Date: 2007年06月14日 20:29:49 +0200 
(2007年6月14日)) right now, and it works there.
-Rob
----
Rob Hetland, Associate Professor
Dept. of Oceanography, Texas A&M University
http://pong.tamu.edu/~rob
phone: 979-458-0096, fax: 979-845-6331
From: John H. <jd...@gm...> - 2007年11月20日 14:12:02
On Nov 20, 2007 7:44 AM, Rob Hetland <he...@ta...> wrote:
>
>
> I sent a note a while ago about a key events being broken. I have a
> bit more information, but still no solution:
>
> - Other mouse-based events seem to work just fine
> - Key events broke somewhere between 2007年11月7日 and 2007年11月10日
I am using tkagg with svn and key events are working. Just to make
sure we are doing exactly the same thing, I am running
examples/simple_plot.py with -dTkAgg and clicking in the subplot area
and then pressing 'g' to toggle the grid on and off. Does this not
work for you. In your earlier post, you mentioned something about
carbon. Can you give some more details on your exact environment?
JDH
From: Rob H. <he...@ta...> - 2007年11月20日 13:45:06
I sent a note a while ago about a key events being broken. I have a 
bit more information, but still no solution:
 - Other mouse-based events seem to work just fine
 - Key events broke somewhere between 2007年11月7日 and 2007年11月10日
-Rob
----
Rob Hetland, Associate Professor
Dept. of Oceanography, Texas A&M University
http://pong.tamu.edu/~rob
phone: 979-458-0096, fax: 979-845-6331
From: Michael D. <md...@st...> - 2007年11月20日 13:30:06
Seems like a good idea to me. I'm a little surprised we haven't seen 
this case before. Thanks for the patch -- it's committed in SVN r4391.
Cheers,
Mike
Ben North wrote:
> Hi,
> 
> I think there is a bug in the PostScript backend, when trying to draw a
> polygon with zero linewidth. If you have a zero linewidth, the
> generated PostScript is along the lines of
> 
> 173.31 49.274 m
> 305.066 57.999 l
> 173.533 46.684 l
> closepath
> gsave
> fill
> grestore
> 
> whereas if there is a non-zero linewidth, you get
> 
> 173.31 49.274 m
> 305.066 57.999 l
> 173.533 46.684 l
> closepath
> gsave
> fill
> grestore
> stroke
> 
> The problem is that in the zero-linewidth case, the path is not cleared.
> Therefore, next time there is a 'stroke', that part of the path is
> stroked. In theory, this doesn't matter because its linewidth is zero,
> but the PostScript docs say not completely unambiguously that a
> zero-width line is as thin as the device allows. Ghostview, for
> instance, makes this noticeably non-zero-width and the result looks
> wrong. Besides, it seems cleaner to leave the current path in the same
> state (i.e., empty) in both cases. The below patch, against SVN head,
> seems to fix this.
> 
> Ben.
> 
> - - - - 8< - - - -
> 
> --- SVN--backend_ps.py 2007年11月20日 12:08:51.036996600 +0000
> +++ backend_ps.py 2007年11月20日 12:09:00.100300100 +0000
> @@ -947,6 +947,9 @@
> 
> if self.linewidth > 0:
> write("stroke\n")
> + else:
> + write("newpath\n")
> +
> if cliprect:
> write("grestore\n")
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Ben N. <be...@re...> - 2007年11月20日 13:16:20
Hi,
I think there is a bug in the PostScript backend, when trying to draw a
polygon with zero linewidth. If you have a zero linewidth, the
generated PostScript is along the lines of
 173.31 49.274 m
 305.066 57.999 l
 173.533 46.684 l
 closepath
 gsave
 fill
 grestore
whereas if there is a non-zero linewidth, you get
 173.31 49.274 m
 305.066 57.999 l
 173.533 46.684 l
 closepath
 gsave
 fill
 grestore
 stroke
The problem is that in the zero-linewidth case, the path is not cleared.
Therefore, next time there is a 'stroke', that part of the path is
stroked. In theory, this doesn't matter because its linewidth is zero,
but the PostScript docs say not completely unambiguously that a
zero-width line is as thin as the device allows. Ghostview, for
instance, makes this noticeably non-zero-width and the result looks
wrong. Besides, it seems cleaner to leave the current path in the same
state (i.e., empty) in both cases. The below patch, against SVN head,
seems to fix this.
Ben.
- - - - 8< - - - -
--- SVN--backend_ps.py 2007年11月20日 12:08:51.036996600 +0000
+++ backend_ps.py 2007年11月20日 12:09:00.100300100 +0000
@@ -947,6 +947,9 @@
 if self.linewidth > 0:
 write("stroke\n")
+ else:
+ write("newpath\n")
+
 if cliprect:
 write("grestore\n")
From: Jeff W. <js...@fa...> - 2007年11月20日 01:57:31
Christopher Barker wrote:
> Jeff Whitaker wrote:
> 
>> 1) an external dependency on the GEOS lib (which is LGPL).
>> 
>
> Would it be any better to depend on an existing python binding GEOS? 
> Here's one option:
>
> http://trac.gispython.org/projects/PCL/wiki/Shapely
>
> -Chris
>
>
> 
Chris: I prototyped the code changes with Shapely (which uses ctypes), 
then coded my own pyrex replacement, both to get more speed and to avoid 
depending on ctypes too.
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328
From: Eric F. <ef...@ha...> - 2007年11月20日 01:18:55
Christopher Barker wrote:
> 
> Jeff Whitaker wrote:
>> 1) an external dependency on the GEOS lib (which is LGPL).
> 
> Would it be any better to depend on an existing python binding GEOS? 
> Here's one option:
> 
> http://trac.gispython.org/projects/PCL/wiki/Shapely
That is what Jeff started with, but it uses ctypes, and adds complexity 
to the licensing and the installation. Therefore he wrote his own pyrex 
binding to the C API of GEOS, which avoids all that and works fine for 
basemap purposes.
Eric
> 
> -Chris
> 
> 
From: Christopher B. <Chr...@no...> - 2007年11月20日 00:35:45
Jeff Whitaker wrote:
> 1) an external dependency on the GEOS lib (which is LGPL).
Would it be any better to depend on an existing python binding GEOS? 
Here's one option:
http://trac.gispython.org/projects/PCL/wiki/Shapely
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...

Showing 19 results of 19

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