[manual] suggested addition to pcolor description
Ben Abbott
bpabbott at mac.com
Tue Feb 3 19:17:00 CST 2009
On Feb 3, 2009, at 7:25 AM, Petr Mikulik wrote:
>>>>> pcolor([1 2; 3 3])
>>>>> shading interp
>>>>> shading flat
>>>>>
>>>>> Therefore, I've written the following patch:
>>>>> https://sourceforge.net/tracker/index.php?func=detail&aid=2558565&group_id=2055&atid=302055
>>>>> [ 2558565 ] pm3d interpolate 0,0
>>>>> The animated demo there shows color surface transformations;
>>>>> Octave would
>>>>> use for its "shading interp" the option
>>>>> set pm3d interpolate 0,0
>>>>
>>>> I think the attached files look good ... but can you describe
>>>> what has been
>>>> changed. The results (in your email) look very similar to what
>>>> the current
>>>> gnuplot sources produce.
>>>
>>> It is desired to achieve higher resolution plot with an
>>> alternative "pm3d
>>> interpolate" option. Let us suppose that "continuous" colour
>>> gradient on the
>>> map/surface would need edge size of at least 200 pixels on screen
>>> window.
>>> Then
>>> a=hilb(4);
>>> pcolor(a);
>>> would need
>>> set pm3d interpolate 50,50
>>> while
>>> a=hilb(100);
>>> pcolor(a);
>>> would need
>>> set pm3d interpolate 2,2
>>>
>>> With the new patch, you can set
>>> set pm3d interpolate -200,-200
>>> and gnuplot will ensure at least 200 points in both cases, i.e.
>>> Octave
>>> passes the sampling to the drawing backend.
>>>
>>> Currently,
>>> set pm3d interpolate 0,0
>>> is equivalent to 200 points.
>>
>> Ok, thanks for explaining.
>>
>> I'll patch my gnuplot sources and work on a patch for Octave.
>>
>> Are you looking for some of us to test drive your gnuplot patch, as
>> well?
>
> Yes, please try to patch both gnuplot and Octave and tell me whether
> it
> gives the desired image.
>
> Note that
> set pm3d interpolate 0,0
> can always be issued by Octave because current versions of gnuplot
> silently ignore non-positive numbers.
>
> ---
> PM
Ok, I've made a local change to __go_draw_axes__.m and produce some
images with both Octave+Gnuplot as well as Matlab.
Those interested can see them at the link below.
http://www.picturehosting.com/gallery.php?u=bpabbott&g=pm3d
Those who would like to exercise this functionality will need to apply
Petr's patch to the developer's sources for gnuplot, and apply the
attached changeset to the developers sources for Octave.
Notice that I've attempted to modulate the levels of interpolation to
correspond to the levels in the colormap.
Petr, can you comment on my changeset. Specifically, it is not clear
to me if this would not work without out your patch.
I tried the following example as well
surf(peaks)
colormap(jet(200))
shading interp
After an unpleasant delay a nice image was produced. Checking my Mac
OSX activity monitor it appears that gnuplot requires 750MB of real
memory and 2.5GB of virtual memory to produce this image. It is due
to the excessive time and memory requiried that I decided to limit the
levels of interpolation that occur across a particular quadrangle.
Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: changeset-pm3d.patch
Type: application/octet-stream
Size: 1378 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/bug-octave/attachments/20090203/47b55f55/attachment.obj
-------------- next part --------------
More information about the Bug-octave
mailing list