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
|
|
From: Fernando P. <Fer...@co...> - 2005-06-01 16:50:27
|
John Hunter wrote: >>>>>>"Fernando" == Fernando Perez <Fer...@co...> writes: > > > Fernando> mmh, just yesterday I was talking to JDH about this: I > Fernando> have the feeling that the right place to implement this > Fernando> would be to provide colormaps (the beasts lurking > Fernando> underneath colorbars) with an easy way to get reversed > Fernando> versions. I don't think that a hack at the level of the > Fernando> colorbar function is the right place, design wise, to do > Fernando> this. But I could be wrong... > > Unless I misunderstand, Nicolas and you want different things. You > want a reversed color map (eg for the case of jet, red would map to > small numbers and blue to large numbers). Nicolas wants a standard > colormap but with the colorbar display inverted (red would still map > to large numbers but for vertical colorbars would be on the bottom and > for horizontal colorbars would be on the left -- the colorbar tick > labels would change too). Ah! Yes, sorry: I did misunderstand Nicolas, probably because I parsed his post through the lens of our discussion too quickly. Sorry for the noise... I wonder though: if we also get 'reversed' colormaps, is this going to be a cause for confusion with the 'reversed' colorbar keyword? It may not be a problem in the end, as long as the two different ideas are clearly explained, to prevent others falling into the same trap I did. f |
|
From: Nicolas G. <nic...@ne...> - 2005-06-01 16:46:06
|
On Wednesday 01 June 2005 18:38, John Hunter wrote: > Unless I misunderstand, Nicolas and you want different things. You > want a reversed color map (eg for the case of jet, red would map to > small numbers and blue to large numbers). Nicolas wants a standard > colormap but with the colorbar display inverted (red would still map > to large numbers but for vertical colorbars would be on the bottom and > for horizontal colorbars would be on the left -- the colorbar tick > labels would change too). > > Or am I misunderstanding? > At least you understood correctly what I meant ;-) |
|
From: John H. <jdh...@ac...> - 2005-06-01 16:40:23
|
>>>>> "Fernando" == Fernando Perez <Fer...@co...> writes:
Fernando> mmh, just yesterday I was talking to JDH about this: I
Fernando> have the feeling that the right place to implement this
Fernando> would be to provide colormaps (the beasts lurking
Fernando> underneath colorbars) with an easy way to get reversed
Fernando> versions. I don't think that a hack at the level of the
Fernando> colorbar function is the right place, design wise, to do
Fernando> this. But I could be wrong...
Unless I misunderstand, Nicolas and you want different things. You
want a reversed color map (eg for the case of jet, red would map to
small numbers and blue to large numbers). Nicolas wants a standard
colormap but with the colorbar display inverted (red would still map
to large numbers but for vertical colorbars would be on the bottom and
for horizontal colorbars would be on the left -- the colorbar tick
labels would change too).
Or am I misunderstanding?
JDH
|
|
From: Fernando P. <Fer...@co...> - 2005-06-01 16:10:05
|
Nicolas Girard wrote: > Hi all, > > with most of my contours, upper values are on the left side and lower values > on the right side ; to the contrary the colorbar (created with > orientation='horizontal') displays colors ranging from the lowest to the > highest ; this leads to an unpleasant look. (No, I cannot reverse my whole > contours, their orientation is important ;-) > > What I'd find useful is a "reverse" option that would make the colorbar > display colors ranging from the highest to the lowest ; and I've tried to > hack the figure.py file. mmh, just yesterday I was talking to JDH about this: I have the feeling that the right place to implement this would be to provide colormaps (the beasts lurking underneath colorbars) with an easy way to get reversed versions. I don't think that a hack at the level of the colorbar function is the right place, design wise, to do this. But I could be wrong... I've been meaning to make some changes to the colormaps code to fix this along with a number of other annoyances it has, but I haven't gotten around to it yet. Best, f |
|
From: Nicolas G. <nic...@ne...> - 2005-06-01 15:36:52
|
Hi all, with most of my contours, upper values are on the left side and lower values on the right side ; to the contrary the colorbar (created with orientation='horizontal') displays colors ranging from the lowest to the highest ; this leads to an unpleasant look. (No, I cannot reverse my whole contours, their orientation is important ;-) What I'd find useful is a "reverse" option that would make the colorbar display colors ranging from the highest to the lowest ; and I've tried to hack the figure.py file. You'll find the attached patch as a result. apart from fixing a pair of typos in the docstring, it allows *colors* of the colorbars to be reversed, but not its ticks :-/ Then I'm afraid this patch is all but useful... but perhaps it helps getting the idea. I'd glad if this feature could be added to the colorbar... Thanks for reading, Cheers, Nicolas |
|
From: John H. <jdh...@ac...> - 2005-06-01 15:04:33
|
>>>>> "Nicholas" == Nicholas Young <su...@su...> writes:
Nicholas> Now done in the attached patch, I also added support for
Nicholas> MxNx3 images; as I suspected these are noticeably slower
Nicholas> than MxNx4 images but I changed my mind and decided it
Nicholas> was worth supporting them.
Great, I just committed this to CVS.
Andrew, if you get a minute to update from CVS, can you make sure that
the PIL changes don't cause a problem for your PIL using mpl scripts?
Thanks!
JDH
|
|
From: Nicholas Y. <su...@su...> - 2005-06-01 14:48:14
|
On Wed, 2005-06-01 at 13:14 +0100, Nicholas Young wrote: > On Wed, 2005-06-01 at 12:39 +0100, Nicholas Young wrote: > > On Tue, 2005-05-31 at 10:28 -0500, John Hunter wrote: > > > >>>>> "Nicholas" == Nicholas Young <su...@su...> writes: > > > I have mixed feelings about making this a separate class / separate > > > function. The current axes imshow / image.AxesImage is already > > > overloaded (handling MxN, MxNx3, MxNx3, _image.Image and PIL images. > > > What is the logic of making a special functions/classes case for MxNx4 > > > with directshow. On the one hand, I appreciate the desire to simplify > > > the code by pulling it into separate classes and functions. On the > > > other hand, I wonder if it will confuse users to have one separate > > > function for UInt8 images and another for everything else. Another > > > worry I have about the separate DirectImage class is that it copies > > > much of the image resize functionality from AxesImage, including the > > > broken handling of aspect='preserve'. This too argues for keeping as > > > much functionality in AxesImage as possible, testing for A.typecode() > > > where appropriate. What do you think? > > Sorry to reply to my own message but I realised just after sending it > that it didn't make any sense (as MxNx4 images aren't normalised > anyway). I now realise that it makes sense to assume that an MxNx4 > UInt8 image will contain pixel data as John suggested and I'll rewrite > my code to implement this. > > It also occurred to me that it would make sense to change the PIL code > to avoid the UInt8 -> Float -> UInt transition. I'll try implementing > this after making the alterations John suggested. Now done in the attached patch, I also added support for MxNx3 images; as I suspected these are noticeably slower than MxNx4 images but I changed my mind and decided it was worth supporting them. I changed the PIL image output to output from PIL RGBX (alpha is 255) or RGBA images only when converting to a string and then array. This will use more memory but, as the conversion to RGBA is done no more than once and by PIL code (which is probably optimised), should be the fastest option. I changed the conversion code to always attempt to convert to RGBA whenever an unsupported format is given and to raise an error on catching a ValueError (rather than before trying the conversion); this adds support for several image types. I'd also suggest changing the error raised here to a ValueError rather than a SystemError (as the error is due to an unsupported value) but haven't in case others are catching the SystemError. Additionally I changed the docstring for the imshow function to state that floating point MxNx3 and MxNx4 arrays aren't normalised (this was the original source of my earlier confusion). Nick |
|
From: Nicholas Y. <N.P...@wa...> - 2005-06-01 12:15:25
|
On Wed, 2005-06-01 at 12:39 +0100, Nicholas Young wrote: > On Tue, 2005-05-31 at 10:28 -0500, John Hunter wrote: > > >>>>> "Nicholas" == Nicholas Young <su...@su...> writes: > > I have mixed feelings about making this a separate class / separate > > function. The current axes imshow / image.AxesImage is already > > overloaded (handling MxN, MxNx3, MxNx3, _image.Image and PIL images. > > What is the logic of making a special functions/classes case for MxNx4 > > with directshow. On the one hand, I appreciate the desire to simplify > > the code by pulling it into separate classes and functions. On the > > other hand, I wonder if it will confuse users to have one separate > > function for UInt8 images and another for everything else. Another > > worry I have about the separate DirectImage class is that it copies > > much of the image resize functionality from AxesImage, including the > > broken handling of aspect='preserve'. This too argues for keeping as > > much functionality in AxesImage as possible, testing for A.typecode() > > where appropriate. What do you think? > > I'm happy for it be be called from imshow but I can't think of a syntax > to do so which isn't going to be confusing. The existing variations to > imshow are all based upon the type of the input image and this won't > work here - the case of someone who wants to plot a MxNx4 UInt8 array > and have the values it contains normalised being the problem. Another > keyword parameter could be added which only takes effect in this case; I > thought this likely to confuse but if you prefer it I'm happy. Sorry to reply to my own message but I realised just after sending it that it didn't make any sense (as MxNx4 images aren't normalised anyway). I now realise that it makes sense to assume that an MxNx4 UInt8 image will contain pixel data as John suggested and I'll rewrite my code to implement this. It also occurred to me that it would make sense to change the PIL code to avoid the UInt8 -> Float -> UInt transition. I'll try implementing this after making the alterations John suggested. Nick |
|
From: Nicholas Y. <su...@su...> - 2005-06-01 11:39:23
|
On Tue, 2005-05-31 at 10:28 -0500, John Hunter wrote: > >>>>> "Nicholas" == Nicholas Young <su...@su...> writes: > I have mixed feelings about making this a separate class / separate > function. The current axes imshow / image.AxesImage is already > overloaded (handling MxN, MxNx3, MxNx3, _image.Image and PIL images. > What is the logic of making a special functions/classes case for MxNx4 > with directshow. On the one hand, I appreciate the desire to simplify > the code by pulling it into separate classes and functions. On the > other hand, I wonder if it will confuse users to have one separate > function for UInt8 images and another for everything else. Another > worry I have about the separate DirectImage class is that it copies > much of the image resize functionality from AxesImage, including the > broken handling of aspect='preserve'. This too argues for keeping as > much functionality in AxesImage as possible, testing for A.typecode() > where appropriate. What do you think? I'm happy for it be be called from imshow but I can't think of a syntax to do so which isn't going to be confusing. The existing variations to imshow are all based upon the type of the input image and this won't work here - the case of someone who wants to plot a MxNx4 UInt8 array and have the values it contains normalised being the problem. Another keyword parameter could be added which only takes effect in this case; I thought this likely to confuse but if you prefer it I'm happy. Nick |
|
From: John H. <jdh...@ac...> - 2005-05-31 15:30:18
|
>>>>> "Nicholas" == Nicholas Young <su...@su...> writes:
Nicholas> I think it's partly in there in a non-functional form,
Nicholas> the patch I've attached removes it and adds a new
Nicholas> function to the Axes class called directshow. This
Nicholas> accepts the same syntax as imshow (where relevant)
Nicholas> rather than adding options to imshow; I chose to do this
Nicholas> as my old syntax for passing through imshow wasn't that
Nicholas> easy to understand didn't makes the different
Nicholas> functionality clear. This function calls a class call
Nicholas> DirectImage which inherits from AxesImage.
I have mixed feelings about making this a separate class / separate
function. The current axes imshow / image.AxesImage is already
overloaded (handling MxN, MxNx3, MxNx3, _image.Image and PIL images.
What is the logic of making a special functions/classes case for MxNx4
with directshow. On the one hand, I appreciate the desire to simplify
the code by pulling it into separate classes and functions. On the
other hand, I wonder if it will confuse users to have one separate
function for UInt8 images and another for everything else. Another
worry I have about the separate DirectImage class is that it copies
much of the image resize functionality from AxesImage, including the
broken handling of aspect='preserve'. This too argues for keeping as
much functionality in AxesImage as possible, testing for A.typecode()
where appropriate. What do you think?
Also, note the matplotlib CVS has added several new image
interpolation methods. Some of these need the parameters
filternorm=1,
filterrad=4.0
as described in the imshow docstring. Since directimage exposes the
interpolation method, shouldn't it also expose these new params.
Nicholas> I've also rewritten my c++ image object creation
Nicholas> function called frombyte to take an unsigned byte array
Nicholas> as input rather than a buffer. By using the
Nicholas> std::memcopy function rather than a loop for copying the
Nicholas> speed advantage of passing data in as a buffer
Nicholas> disappears and using arrays is generally more intuitive.
Nicholas> The function still only takes x*y*4 arrays as input at
Nicholas> the moment as the processor time decrease from not using
Nicholas> loops to copy is fairly significant.
Looks good to me. I'll hold off on applying these changes until I
hear from you on the issues above.
Thanks!
JDH
|
|
From: John H. <jdh...@ac...> - 2005-05-31 15:20:19
|
>>>>> "Daishi" == Daishi Harada <da...@eg...> writes:
Daishi> Hi John, I've uploaded some new files to sourceforge.
Daishi> On May 26, 2005, at 7:34 PM, John Hunter wrote:
>> My only suggestions are: 1) move the dash text class to the
>> text module rather than the axis module (where it seems to
>> belong since it is a general purpose connector between a text
>> instance and a point), and
Daishi> Done. I also slightly modified axes.py to facilitate
Daishi> providing your suggestion 2).
I've added the changes to CVS text.py revision: 1.27
Thanks again!
JDH
|
|
From: Eric F. <ef...@ha...> - 2005-05-30 00:40:37
|
Jeff, > Eric: Thanks - contour indeed now seems to work perfectly with masked > arrays, but I still have problems with contourf (see attached > ortho_test.png). Unfortunately, neither of your suggested workarounds > help, the first makes no difference and the second makes it much worse. > -Jeff It is not working in your basemap/examples/contour_demo.py, either, so this does not seem to be exclusively a masked array support problem. I hope I can figure it out. Eric |
|
From: Nicholas Y. <su...@su...> - 2005-05-29 15:45:16
|
I sent this message sometime on Friday but as it doesn't seem to have made it to the sourceforge list yet I'm assuming it's not going to and trying again. On Thu, 2005-05-26 at 21:15 -0500, John Hunter wrote: > >>>>> "Nicholas" == Nicholas Young <su...@su...> writes: > > Nicholas> Hi, I made a suggestion for improving imshow performance > Nicholas> for plotting an image already in byte string form a > Nicholas> while ago; some of the results are currently in CVS. I > Nicholas> seems that other changes made to CVS at the same time or > Nicholas> since mean that the floating point buffer source code is > Nicholas> now much faster and I'd suggest taking anything sourced > Nicholas> from my code back out. > > Maybe that explains why I was never able to get the same performance > benefits you were seeing.... But I was able to get 1.5x - 2.5x faster > with your patch, which is pretty damned good. And the memory > benefit of your patch could be substantial as well. Why pull it? When I first tried the new CVS code (other than my own) I was rather rushed trying to get a paper finished and tested with too small an image and thus saw too small a speedup for it to be worth it. I'm also using non-contiguous arrays which make the relative speed increase smaller. I also didn't think the interface was particularly user friendly. I'm now sure why my code was faster (a mixture of data copying using optimised functions and no need do floating point to integer conversion) and have written some new code which is slightly faster than the old and has a nicer interface (patch to CVS attached). > What are your latest profiling numbers? Profiling with my latest version and comparing to CVS I get: Running with 1024x1024: Starting array: Array set up: resident stack size: 37408, size: 12571 Tests done: resident stack size: 41536, size: 13596 Elapsed: 7.674 Starting byte: Byte set up: resident stack size: 12876, size: 6429 Tests done: resident stack size: 12880, size: 6428 Elapsed: 0.521 Fractional improvement: 13.724 Running with 2048x2048: Starting array: Array set up: resident stack size: 143956, size: 39197 Tests done: resident stack size: 156252, size: 42269 Elapsed: 29.577 Starting byte: Byte set up: resident stack size: 37464, size: 12573 Tests done: resident stack size: 37464, size: 12572 Elapsed: 2.098 Fractional improvement: 13.100 Running with 4096x4096: Starting array: Array set up: resident stack size: 561756, size: 143646 Tests done: resident stack size: 609388, size: 155963 Elapsed: 127.401 Starting byte: Byte set up: resident stack size: 66376, size: 37178 Tests done: resident stack size: 132280, size: 37177 Elapsed: 8.526 Fractional improvement: 13.943 > Your patch came in just at the time I was leaving for Paris for a > meeting, after which I experienced a rather nasty total hard drive > failure that set me back in my mpl maintenance. I am not sure I am > ready to give up on the ideas you introduced.... Can you remind me -- > did I manage to incorporate all of the matplotlib.axes and > matplotlib.image patches I needed to take advantage of your patches to > the _image extension code? I think it's partly in there in a non-functional form, the patch I've attached removes it and adds a new function to the Axes class called directshow. This accepts the same syntax as imshow (where relevant) rather than adding options to imshow; I chose to do this as my old syntax for passing through imshow wasn't that easy to understand didn't makes the different functionality clear. This function calls a class call DirectImage which inherits from AxesImage. I've also rewritten my c++ image object creation function called frombyte to take an unsigned byte array as input rather than a buffer. By using the std::memcopy function rather than a loop for copying the speed advantage of passing data in as a buffer disappears and using arrays is generally more intuitive. The function still only takes x*y*4 arrays as input at the moment as the processor time decrease from not using loops to copy is fairly significant. Nick |
|
From: Jeff W. <js...@fa...> - 2005-05-29 13:19:15
|
Eric Firing wrote: > John, > > The attached diff contains a bugfix for the masking problem that Jeff > found: > > diff -Naur cntr.c_as_sent cntr.c > cntr_bugfix.diff > > where cntr.c_as_sent is the old version, cntr.c is the corrected version. > > I was simply not transferring the information correctly from the mask > to the "reg" array that cntr.c uses; I was setting a value, and then > accidentally overwriting it with what should have been an initialization. > > With this patch, masked arrays should be handled no better and no > worse than before the change from gcntr.c to cntr.c; as far as I know, > masking works perfectly for line contours, and it works correctly for > filled contours under many but not all circumstances. I tried two > workarounds for the latter problem: > > 1) in line 1359 of cntr.c, change the nchunk variable from 30 to a > much smaller value. > long nchunk = 30; /* hardwired for now */ > This causes the generation of many small polygons, so it may slow > things down quite a bit, and it causes the boundaries to look a little > glitchy on the screen (gtkagg); but I haven't done timing tests, and I > haven't tried other backends. > > 2) change the end of ContourSupport._contour_args(), in contour.py: > > self.ax.set_xlim((ma.minimum(x), ma.maximum(x))) > self.ax.set_ylim((ma.minimum(y), ma.maximum(y))) > # Workaround for cntr.c bug wrt masked interior regions: > #if filled: > # z = ma.masked_array(z.filled(-1e38)) > # It's not clear this is any better than the original bug. > return (x, y, z, lev) > > The workaround is to uncomment the "if filled:" block. This method > also works, but can leave some artifacts around the boundary of the > bad region. > > I am not recommending that either of these workarounds be added to > CVS, but if some individual runs into major trouble because of the > bug, then either of these methods could be used as a stopgap on an > individual basis. > > Eric > Eric: Thanks - contour indeed now seems to work perfectly with masked arrays, but I still have problems with contourf (see attached ortho_test.png). Unfortunately, neither of your suggested workarounds help, the first makes no difference and the second makes it much worse. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/CDC1 FAX : (303)497-6449 325 Broadway Web : http://www.cdc.noaa.gov/~jsw Boulder, CO, USA 80305-3328 Office: Skaggs Research Cntr 1D-124 |
|
From: Eric F. <ef...@ha...> - 2005-05-29 02:27:38
|
John,
The attached diff contains a bugfix for the masking problem that Jeff found:
diff -Naur cntr.c_as_sent cntr.c > cntr_bugfix.diff
where cntr.c_as_sent is the old version, cntr.c is the corrected version.
I was simply not transferring the information correctly from the mask to
the "reg" array that cntr.c uses; I was setting a value, and then
accidentally overwriting it with what should have been an initialization.
With this patch, masked arrays should be handled no better and no worse
than before the change from gcntr.c to cntr.c; as far as I know, masking
works perfectly for line contours, and it works correctly for filled
contours under many but not all circumstances. I tried two workarounds
for the latter problem:
1) in line 1359 of cntr.c, change the nchunk variable from 30 to a much
smaller value.
long nchunk = 30; /* hardwired for now */
This causes the generation of many small polygons, so it may slow things
down quite a bit, and it causes the boundaries to look a little glitchy
on the screen (gtkagg); but I haven't done timing tests, and I haven't
tried other backends.
2) change the end of ContourSupport._contour_args(), in contour.py:
self.ax.set_xlim((ma.minimum(x), ma.maximum(x)))
self.ax.set_ylim((ma.minimum(y), ma.maximum(y)))
# Workaround for cntr.c bug wrt masked interior regions:
#if filled:
# z = ma.masked_array(z.filled(-1e38))
# It's not clear this is any better than the original bug.
return (x, y, z, lev)
The workaround is to uncomment the "if filled:" block. This method also
works, but can leave some artifacts around the boundary of the bad region.
I am not recommending that either of these workarounds be added to CVS,
but if some individual runs into major trouble because of the bug, then
either of these methods could be used as a stopgap on an individual basis.
Eric
John Hunter wrote:
>>>>>>"Jeff" == Jeff Whitaker <js...@fa...> writes:
>
>
> Jeff> The basemap toolkit relies on the 'badmask' parameter in
> Jeff> contour/contourf to mask out areas outside the desired map
> Jeff> projection region in matplotlib 0.80. It works quite
> Jeff> well. Unfortunately, the new masked array support in CVS
> Jeff> doesn't (I get all kinds of weird artifacts, especially for
> Jeff> contourf but also for contour). Can the old badmask
> Jeff> functionality be added back in for 0.81, at least
> Jeff> temporarily until the masked array support stabilizes?
>
> I don't have anything to add to this, I'm just replying so I can CC
> Eric Firing, who added the masked array support to contour, because I
> don't know if he is on the devel list.
>
> JDH
|
|
From: Eric F. <ef...@ha...> - 2005-05-28 20:30:48
|
John, Jeff, Yes, I am on the matplotlib-devel list. Coincidentally, while walking in to work yesterday, a possible workaround for the long-standing contourf mask bug occurred to me. In the process of testing it, I found that masking was not working as expected for either contour or contourf. I had done a little testing before sending in cntr.c and related changes, but obviously I missed the problem then. The cause should be quite simple and localized. I think I can track it down and come up with a clean fix, so that at worst only the original contourf bug remains (and maybe the workaround for that will, indeed, work). Please allow me a little time to work on this. Eric John Hunter wrote: >>>>>>"Jeff" == Jeff Whitaker <js...@fa...> writes: > > > Jeff> The basemap toolkit relies on the 'badmask' parameter in > Jeff> contour/contourf to mask out areas outside the desired map > Jeff> projection region in matplotlib 0.80. It works quite > Jeff> well. Unfortunately, the new masked array support in CVS > Jeff> doesn't (I get all kinds of weird artifacts, especially for > Jeff> contourf but also for contour). Can the old badmask > Jeff> functionality be added back in for 0.81, at least > Jeff> temporarily until the masked array support stabilizes? > > I don't have anything to add to this, I'm just replying so I can CC > Eric Firing, who added the masked array support to contour, because I > don't know if he is on the devel list. > > JDH |
|
From: John H. <jdh...@ac...> - 2005-05-28 20:04:11
|
>>>>> "Jeff" == Jeff Whitaker <js...@fa...> writes:
Jeff> The basemap toolkit relies on the 'badmask' parameter in
Jeff> contour/contourf to mask out areas outside the desired map
Jeff> projection region in matplotlib 0.80. It works quite
Jeff> well. Unfortunately, the new masked array support in CVS
Jeff> doesn't (I get all kinds of weird artifacts, especially for
Jeff> contourf but also for contour). Can the old badmask
Jeff> functionality be added back in for 0.81, at least
Jeff> temporarily until the masked array support stabilizes?
I don't have anything to add to this, I'm just replying so I can CC
Eric Firing, who added the masked array support to contour, because I
don't know if he is on the devel list.
JDH
|
|
From: Jeff W. <js...@fa...> - 2005-05-28 15:05:59
|
The basemap toolkit relies on the 'badmask' parameter in contour/contourf to mask out areas outside the desired map projection region in matplotlib 0.80. It works quite well. Unfortunately, the new masked array support in CVS doesn't (I get all kinds of weird artifacts, especially for contourf but also for contour). Can the old badmask functionality be added back in for 0.81, at least temporarily until the masked array support stabilizes? -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/CDC1 FAX : (303)497-6449 325 Broadway Web : http://www.cdc.noaa.gov/~jsw Boulder, CO, USA 80305-3328 Office: Skaggs Research Cntr 1D-124 |
|
From: Daishi H. <da...@eg...> - 2005-05-27 20:27:33
|
Hi John, I've uploaded some new files to sourceforge. On May 26, 2005, at 7:34 PM, John Hunter wrote: > My only suggestions > are: 1) move the dash text class to the text module rather than the > axis > module (where it seems to belong since it is a general purpose > connector between a text instance and a point), and Done. I also slightly modified axes.py to facilitate providing your suggestion 2). > 2) provide an example > which uses a generic text instance in addition to the one you provided > using a tick label text instance. Please see the new example, which I'm attaching below. As I note in the script which generated the plot, the various rotations are meant to show the possibilities, rather than for visual appeal. > As for the alignment problems (in agg or ps at least), they may be a > result of sf bugs #1194018 and #1177396. I also think the current rendering when separate rotations for the text and the dash are specified is suboptimal (I show examples of this in the new example plot), but the current code satisfies my immediate use case, so I'm hoping that if/as this extension gets incorporated into the matplotlib codebase, others will find that improving the current rotation/transformation logic will be an itch that they want to scratch. Thx, d ps. FWIW, the last letter in my name is an 'i', not an 'a'. (I edited the CHANGELOG to reflect this) |
|
From: John H. <jdh...@ac...> - 2005-05-27 02:35:37
|
>>>>> "Daishi" == Daishi Harada <da...@eg...> writes:
Daishi> Please let me know if there are any modifications to the
Daishi> patch which would make it a better candidate for
Daishi> incorporation into the mainline source.
Hey Daishi,
That is certainly a nice patch and a funky example -- well done.
I was very pleased to see that you added this as a general text
feature and not a feature of text ticks only. My only suggestions
are: 1) move the dash text class to the text module rather than the axis
module (where it seems to belong since it is a general purpose
connector between a text instance and a point), and 2) provide an example
which uses a generic text instance in addition to the one you provided
using a tick label text instance.
Changes are in CVS -- perhaps you can send me a patch against the
latest revision?
As for the alignment problems (in agg or ps at least), they may be a
result of sf bugs #1194018 and #1177396.
Thanks!
JDH
|
|
From: John H. <jdh...@ac...> - 2005-05-27 02:16:25
|
>>>>> "Nicholas" == Nicholas Young <su...@su...> writes:
Nicholas> Hi, I made a suggestion for improving imshow performance
Nicholas> for plotting an image already in byte string form a
Nicholas> while ago; some of the results are currently in CVS. I
Nicholas> seems that other changes made to CVS at the same time or
Nicholas> since mean that the floating point buffer source code is
Nicholas> now much faster and I'd suggest taking anything sourced
Nicholas> from my code back out.
Maybe that explains why I was never able to get the same performance
benefits you were seeing.... But I was able to get 1.5x - 2.5x faster
with your patch, which is pretty damned good. And the memory
benefit of your patch could be substantial as well. Why pull it?
What are your latest profiling numbers?
Your patch came in just at the time I was leaving for Paris for a
meeting, after which I experienced a rather nasty total hard drive
failure that set me back in my mpl maintenance. I am not sure I am
ready to give up on the ideas you introduced.... Can you remind me --
did I manage to incorporate all of the matplotlib.axes and
matplotlib.image patches I needed to take advantage of your patches to
the _image extension code?
JDH
|
|
From: Daishi H. <da...@eg...> - 2005-05-25 22:49:28
|
Hi, I've posted a patch on sourceforge that extends tick labels to allow for a dash of user-specified length to come between the text label and the actual tick. I'm attaching an example plot below. (The script to generate this example is on sourceforge). The alignment of the dash with the text is less than ideal in the PNG output, but it appears that the font-metrics are backend dependent - the quality of the alignment seems to differ based on the selected backend. Please let me know if there are any modifications to the patch which would make it a better candidate for incorporation into the mainline source. Thanks, d |
|
From: John H. <jdh...@ac...> - 2005-05-24 21:52:57
|
>>>>> "Darren" == Darren Dale <dd...@co...> writes:
Darren> I'm guessing TeX will meet most layout needs. For example,
Darren> I just discovered the \over command, which will generate
Darren> fractions in TeX and LaTeX. \frac only works for LaTeX. I
Darren> will make tex/latex an rc param if you want. Let me know.
frac was the only use case I thought important. If over can do it I
am fine leaving it as TeX. We can generalize later if need be.
JDH
|
|
From: Darren D. <dd...@co...> - 2005-05-24 21:50:08
|
On Tuesday 24 May 2005 5:27 pm, you wrote:
> >>>>> "Darren" =3D=3D Darren Dale <dd...@co...> writes:
>
> Darren> This is expected behavior for PSfrag. You should instead
> Darren> wrap \includegraphics in either a \resizebox or a
> Darren> \scalebox to rescale the text with the figure.
>
> Can you do this?
Yes. backend_latex writes this command to the .tex file, hopefully to guide=
=20
users on how to scale their images:
\scalebox{1}{\includegraphics{<myfile.eps>}}
>
> Darren> It looks like tex_demo.py, without caching, takes about
> Darren> 30% longer with LaTeX than it does for Tex (3 seconds vs
> Darren> 2.3 seconds on my computer). So CVS is back to using
> Darren> TeX. We may want to include a link (or a copy) of this pdf
> Darren> on the MPL website:
> Darren> http://www.csit.fsu.edu/~mimi/tex/tex-refcard.pdf, the
> Darren> source declares it to be freely distributed.
>
> Can tex|latex be an rc param?
I'm guessing TeX will meet most layout needs. For example, I just discovere=
d=20
the \over command, which will generate fractions in TeX and LaTeX. \frac on=
ly=20
works for LaTeX. I will make tex/latex an rc param if you want. Let me know.
Darren
|
|
From: John H. <jdh...@ac...> - 2005-05-24 21:28:14
|
>>>>> "Darren" == Darren Dale <dd...@co...> writes:
Darren> This is expected behavior for PSfrag. You should instead
Darren> wrap \includegraphics in either a \resizebox or a
Darren> \scalebox to rescale the text with the figure.
Can you do this?
Darren> It looks like tex_demo.py, without caching, takes about
Darren> 30% longer with LaTeX than it does for Tex (3 seconds vs
Darren> 2.3 seconds on my computer). So CVS is back to using
Darren> TeX. We may want to include a link (or a copy) of this pdf
Darren> on the MPL website:
Darren> http://www.csit.fsu.edu/~mimi/tex/tex-refcard.pdf, the
Darren> source declares it to be freely distributed.
Can tex|latex be an rc param?
JDH
|