bugGNU Octave - Bugs: bug #42316, "shading interp" does...

 
 

bug #42316: "shading interp" does not work with gnuplot

Submitter:  yang li <dabai223>
Submitted:  Thu 08 May 2014 09:29:54 AM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 15 Dec 2016 04:01:59 PM UTC, comment #5: 

This issue is still present in Octave 4.2.0.

The small code line from comment #4 still gives wrongly colored plots with graphics_toolkit gnuplot.  (Gnuplot version 4.6.6 on linux)

Hartmut <hardy>
Mon 15 Dec 2014 04:21:20 PM UTC, comment #4: 

Interpolated shading does not appear to work with gnuplot.  Whether that is Octave's fault or gnuplot's fault I'm not sure.

A simpler example from the current development tree is


demo ("patch", 7)


I've attached pngs of the output from using FLTK or gnuplot with various backend terminals (X11, WXT).



Rik <rik5>
Group administrator
Sun 02 Nov 2014 05:06:54 PM UTC, comment #3: 

It looks to me like this is still present in the current development version of Octave using the gnuplot backend. The FLTK backend is more capable and does not show the overlapping problem with `shading interp`. I don't know if this is a problem in Octave or a limitation of using gnuplot.

Mike Miller <mtmiller>
Group Member
Fri 09 May 2014 04:10:12 PM UTC, comment #2: 

Thanks for your reply!

Perhaps it is because the version I used is too low. Could you make a test for me please? Thanks!

1. I'm using gnuplot
2. I post an example script as follows:

[x,y,z] = meshgrid(-2:.02:2,-2:.02:2,-2:.02:2);
v = x.*exp(-x.^2-y.^2-z.^2);
xslice = 1; yslice = 1; zslice = -1;
slice(x,y,z,v,xslice,yslice,zslice)
colormap hsv
shading flat
print -dpng slice_flat.png
slice(x,y,z,v,xslice,yslice,zslice)
colormap hsv
shading interp
print -dpng slice_interp.png

Two figures are attached.
Thanks!


yang li <dabai223>
Thu 08 May 2014 11:44:54 PM UTC, comment #1: 

Thanks for your bug report. Can you post an example script or usage that demonstrates this problem? Octave 3.2.4 is quite old and things may have improved in the current version.

Also which plotting toolkit are you using (gnuplot or fltk)?

Mike Miller <mtmiller>
Group Member
Thu 08 May 2014 09:29:54 AM UTC, original submission:  


Using "slice" with "shading interp" causes different slices covered each other.
"shading flat" works well
Although "interp3" could be used to interpolate the data beforehand, it costs a lot of memory and the appearance is not as good as using "shading interp".
Two figures are attatched: one is obtained from using "shading interp" (slice_1.png), the other is from using "interp3" and "shading flat".


yang li <dabai223>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #32674:  fltk.png added by rik5 (169KiB - image/png)
file #32675:  gnuplot_wxt.png added by rik5 (44KiB - image/png)
file #32676:  gnuplot_x11.png added by rik5 (44KiB - image/png)
file #31345:  slice_flat.png added by dabai223 (220KiB - image/png)
file #31346:  slice_interp.png added by dabai223 (192KiB - image/png)
file #31334:  slice1.png added by dabai223 (316KiB - image/png - "interp3" and "shading flat" (slice1.png), "shading interp" (slice_1.png))
file #31335:  slice_1.png added by dabai223 (346KiB - image/png - "interp3" and "shading flat" (slice1.png), "shading interp" (slice_1.png))

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by dabai223 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 14 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-12-13 rik5 Dependencies- bugs #45139 is dependent
    2014-12-15 rik5 Attached File- Added fltk.png, #32674
        Attached File- Added gnuplot_wxt.png, #32675
        Attached File- Added gnuplot_x11.png, #32676
        SummaryUsing &quot;slice&quot; with &quot;shading interp&quot; causes different slices covered each other "shading interp" does not work with gnuplot
    2014-11-02 mtmiller CategoryPlotting Plotting with gnuplot
        StatusNeed Info Confirmed
        Release3.2.4 dev
    2014-05-09 dabai223 Attached File- Added slice_flat.png, #31345
        Attached File- Added slice_interp.png, #31346
    2014-05-08 mtmiller Item GroupNone Incorrect Result
        StatusNone Need Info
    2014-05-08 dabai223 Attached File- Added slice1.png, #31334
        Attached File- Added slice_1.png, #31335

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code