octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #48666] CLimMode/CDataMapping not quite functi


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #48666] CLimMode/CDataMapping not quite functioning correctly
Date: Tue, 2 Aug 2016 02:45:21 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0

Follow-up Comment #2, bug #48666 (project octave):

Perfect compatibility to Matlab hasn't been a major issue for me.  Making
sense and the ability to configure things the way the user might want seems
valid to me.

The second example is behaving correctly generally, it's just that if one
looks at the data and the manual CLim range, the colors don't seem to make
sense.

I'm attaching the gnuplot toolkit result to give you an example of what I
think the colors should be:


octave:1> clf
octave:2> demo('surf', 1)
surf example 1:
 clf;
 colormap ('default');
 Z = peaks ();
 surf (Z);
 title ({'surf() plot of peaks() function'; 'color determined by height Z'});

octave:3> kids = get(gca,'Children');
octave:4> set(kids(1),'cdatamapping','scaled')
octave:5> set(gca,'climmode','manual')
octave:6> get(gca,'clim')
ans =

  -6.5466   8.0752

octave:7> print('-dpng',
'gnuplot_surf_cdatamapping-scaled_climmode-manual-computed-6.5466-8.0752_bug48666.png');
octave:8> set(gca,'clim',[0 1])  # This is a bug, should still look the same
because 'scaled'
octave:9> print('-dpng',
'gnuplot_surf_cdatamapping-scaled_climmode-manual-0-1_bug48666.png');
octave:10> set(kids(1),'cdatamapping','direct')
octave:11> get(gca,'clim')
ans =

   0   1

octave:12> print('-dpng',
'gnuplot_surf_cdatamapping-direct_climmode-manual-0-1_bug48666.png');
octave:13> 


The color for
'gnuplot_surf_cdatamapping-direct_climmode-manual-0-1_bug48666.png' looks
correct to me.  The data of the surface ranges from -6.5466 to 8.0752 so only
that data in the band from [0 1] has non-extremal values.  Everything from
-6.5466 to 0 is mapped to purple.  Everything from 1 to 8.0752 is mapped to
yellow.  This is what Qt is generating for the cdatamapping='scaled',
climmode='manual' case, but I believe that is wrong.  The 'scaled' property
should make the second plot appear similar to the first plot.  Where Qt is
getting that all purple from in the last case I'm not sure.

(file #38070, file #38071, file #38072)
    _______________________________________________________

Additional Item Attachment:

File name:
gnuplot_surf_cdatamapping-scaled_climmode-manual-computed-6.5466-8.0752_bug48666.png
Size:213 KB
File name: gnuplot_surf_cdatamapping-scaled_climmode-manual-0-1_bug48666.png
Size:213 KB
File name: gnuplot_surf_cdatamapping-direct_climmode-manual-0-1_bug48666.png
Size:199 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48666>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]