SourceForge logo
SourceForge logo
Menu

matplotlib-devel

From: Jordan D. <jd...@eo...> - 2008年01月26日 19:19:56
So I have a (slightly) new plot type I would like to add to the 
matplotlib codebase, and I'd like to ask A) if people would be 
interested in the patch and B) what the best way to implement it would be.
I am currently calling the plot type "pcontourf"--it's essentially a 
pcolor, but instead of a continuous color spectra of value, it plots 
discrete levels of data like contourf does. I find this kind of plot 
useful for model output--it displays the model grid, and also emphasizes 
data transitions, for example, between the negative and positive areas 
of a plot, better than pcolor. Essentially it is just a contourf 
wrapper that, instead of calling contourf with values at the 'center' of 
a grid cell, calls contourf with points at the edges of the grid cell so 
you end up with rectangular areas.
If someone is actually interested in clean this up and put it into svn, 
my next question is where in the codebase would be the best place to put 
it so I can make a clean diff file? pyplot.py? I don't quite 
understand how the matplotlib module hierarchy works.
Jordan
From: Eric F. <ef...@ha...> - 2008年01月30日 23:07:38
Jordan,
This sounds useful, but I think it can be implemented without any new 
plot type, simply by using a different sort of norm to do the 
colormapping. I need to add this anyway, and I have a prototype. It is 
very simple. I will get it in within the next few days, and then you 
can see whether it meets your needs.
Eric
Jordan Dawe wrote:
> So I have a (slightly) new plot type I would like to add to the 
> matplotlib codebase, and I'd like to ask A) if people would be 
> interested in the patch and B) what the best way to implement it would be.
> 
> I am currently calling the plot type "pcontourf"--it's essentially a 
> pcolor, but instead of a continuous color spectra of value, it plots 
> discrete levels of data like contourf does. I find this kind of plot 
> useful for model output--it displays the model grid, and also emphasizes 
> data transitions, for example, between the negative and positive areas 
> of a plot, better than pcolor. Essentially it is just a contourf 
> wrapper that, instead of calling contourf with values at the 'center' of 
> a grid cell, calls contourf with points at the edges of the grid cell so 
> you end up with rectangular areas.
> 
> If someone is actually interested in clean this up and put it into svn, 
> my next question is where in the codebase would be the best place to put 
> it so I can make a clean diff file? pyplot.py? I don't quite 
> understand how the matplotlib module hierarchy works.
> 
> Jordan
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
From: Rob H. <he...@ta...> - 2008年01月31日 07:39:16
I was just working with a student to do this. It is straightforward 
(using norms, as Eric suggests), but not short. I think it would be 
good to include wrappers for creating these norms to MPL.
The advantage is then it works for everything: pcolor, scatter, etc.
-Rob
On Jan 31, 2008, at 12:07 AM, Eric Firing wrote:
> Jordan,
>
> This sounds useful, but I think it can be implemented without any new
> plot type, simply by using a different sort of norm to do the
> colormapping. I need to add this anyway, and I have a prototype. 
> It is
> very simple. I will get it in within the next few days, and then you
> can see whether it meets your needs.
>
> Eric
>
> Jordan Dawe wrote:
>> So I have a (slightly) new plot type I would like to add to the
>> matplotlib codebase, and I'd like to ask A) if people would be
>> interested in the patch and B) what the best way to implement it 
>> would be.
>>
>> I am currently calling the plot type "pcontourf"--it's essentially a
>> pcolor, but instead of a continuous color spectra of value, it plots
>> discrete levels of data like contourf does. I find this kind of plot
>> useful for model output--it displays the model grid, and also 
>> emphasizes
>> data transitions, for example, between the negative and positive 
>> areas
>> of a plot, better than pcolor. Essentially it is just a contourf
>> wrapper that, instead of calling contourf with values at the 
>> 'center' of
>> a grid cell, calls contourf with points at the edges of the grid 
>> cell so
>> you end up with rectangular areas.
>>
>> If someone is actually interested in clean this up and put it into 
>> svn,
>> my next question is where in the codebase would be the best place 
>> to put
>> it so I can make a clean diff file? pyplot.py? I don't quite
>> understand how the matplotlib module hierarchy works.
>>
>> Jordan
>>
>>
>> --------------------------------------------------------------------- 
>> ----
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Matplotlib-devel mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
----
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: Paul K. <pki...@ni...> - 2008年01月31日 16:02:19
On Thu, Jan 31, 2008 at 08:38:35AM +0100, Rob Hetland wrote:
> 
> I was just working with a student to do this. It is straightforward 
> (using norms, as Eric suggests), but not short. I think it would be 
> good to include wrappers for creating these norms to MPL.
> 
> The advantage is then it works for everything: pcolor, scatter, etc.
Couldn't you also do this by providing a short colourmap instead of
fiddling the norms?
	- Paul
From: Jordan D. <jd...@eo...> - 2008年01月31日 15:34:33
Eric Firing wrote:
> Jordan,
>
> This sounds useful, but I think it can be implemented without any new 
> plot type, simply by using a different sort of norm to do the 
> colormapping. I need to add this anyway, and I have a prototype. It 
> is very simple. I will get it in within the next few days, and then 
> you can see whether it meets your needs.
>
> Eric
I assume you mean to use pcolor for this kind of plot, but with the 
added ability to specify levels. This doesn't do what I want; I want 
the ability to make large contiguous contourf-style areas outlined with 
contour-style lines that follow the grid edges, not the hundreds of 
little squares that pcolor makes. But I agree that this may not be 
useful enough to warrant a new plot type. I'll just keep using my 
hacked add-on code and if anyone else wants this kind of functionality, 
you can direct them to me.
Jordan
From: Eric F. <ef...@ha...> - 2008年01月31日 17:18:50
Paul Kienzle wrote:
> On Thu, Jan 31, 2008 at 08:38:35AM +0100, Rob Hetland wrote:
>> I was just working with a student to do this. It is straightforward 
>> (using norms, as Eric suggests), but not short. I think it would be 
>> good to include wrappers for creating these norms to MPL.
>>
>> The advantage is then it works for everything: pcolor, scatter, etc.
> 
> Couldn't you also do this by providing a short colourmap instead of
> fiddling the norms?
Yes, but it is not as general a solution. The BoundaryNorm that I will 
add allows arbitrary color boundaries, just as the specification of 
levels in contourf does.
Eric
> 
> 	- Paul
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 によって変換されたページ (->オリジナル) /