Le samedi 10 décembre 2011 14:54:12 Hezekiah M. Carty a écrit : > On Sat, Dec 10, 2011 at 7:57 AM, Pascal <[email protected]> wrote: > > Hi, > > > > I have some trouble with a gradient to use with plimagefr. To me it > > looks like wrong, can someone confirm if it is a normal behaviour or a > > bug? I am using the f90 interface. > > http://pascal.parois.net/public/gradient.png > > If you use plimage, plimagefr, or plshades you will only have as many > steps in the gradient as you have elements in the source array. If > you want a smoother gradient you can either use a larger source array > with smoothly varying values in plimagefr or you can use the > plgradient function. plgradient supports smooth gradients similar to > your example from Gimp. Depending on your output device, plgradient > will either give an example similar to what you showed from Gimp or it > will use internal fallback to approximate a smooth gradient.
Did not notice I did not replied to the list...
So, it was not about the smoothness but the colour which seem off to me.
I can't get anything close to what I have with gimp or pgplot.
I tried like you said:
call plscmap1l(.true., &
& (/0.0_plflt, 0.499_plflt, 0.501_plflt, 1.0_plflt /),&
& (/0.0_plflt, 1.0_plflt, 1.0_plflt, 0.0_plflt /),&
& (/0.0_plflt, 1.0_plflt, 1.0_plflt, 1.0_plflt /),&
& (/1.0_plflt, 1.0_plflt, 1.0_plflt, 0.0_plflt /) )
I also tried using HLS without any luck. Back to RGB, I obtained this (from
top to bottom):
In the first part, how come R is different than B ?
And, why it is not a linear interpolation ?
R G B
000 255 000
085 242 040
142 234 074
186 227 110
210 224 138
224 220 167
226 217 191
231 222 214
238 234 232
250 249 249
----------------
249 248 248
238 231 231
230 212 212
225 189 189
224 165 165
224 136 136
228 107 107
235 071 071
244 036 036
255 000 000
When I calculate it manually, everything is fine:
--------------
integer, dimension(255) :: rr,gg,bb
call plscmap1n(255)
rr%5
gg%5
do i=0,126
gg(i+1)=i*2
bb(i+1)=i*2
rr(i+129)%2-i*2
bb(i+129)%2-i*2
end do
bb(128)%5
call plscmap1(rr,gg,bb);
-----------
Pascal
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------ Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________ Plplot-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/plplot-general
