0

I am trying to make waterfall graphs in the newest version of Octave that has a solid color under each trace (this might not be the best way to describe what I am trying to do, sorry if my vocabulary is not quite correct here). Basically I want the latest version of Octave to behave with waterfall graphs the way that it used to a few years ago when you used the 'shading faceted' line.

Here are some examples using this code:

[X,Y] = meshgrid(-3:.125:3);
Z = peaks(X,Y);
waterfall(X,Y,Z)

In Octave 4.0, that code produced this graph: default waterfall graph octave 4.0

But when you add the line "shading faceted" so that the code looks like this:

[X,Y] = meshgrid(-3:.125:3);
Z = peaks(X,Y);
waterfall(X,Y,Z)
shading interp;

That code produces this graph in Octave 4.0: waterfall graph with "shading faceted" octave 4.0

The problem is, that "shading faceted" line makes no difference in newer versions of Octave- it all looks just like that first graph. So how do I make waterfall graphs look like the "shading faceted" graph from Octave 4.0 BUT in new versions of Octave?

1 Answers1

0

This may be a regression bug. I would encourage you to file a bug report.

However, I think you can obtain what you need by changing the "edgecolor" and "facecolor" properties directly. e.g.

[X,Y] = meshgrid(-3:.125:3);
Z = peaks(X,Y);
H = waterfall(X,Y,Z);
set( H, 'facecolor', 'flat');
set( H, 'edgecolor', [0.4,0.4,0.4]);

You can check what other values are supported for these properties here

Tasos Papastylianou
  • 21,371
  • 2
  • 28
  • 57
  • Thanks, I was thinking it was a bug that developed in later versions that got overlooked as well. However, your solution is definitely helpful, so thanks again! – JimmyJames Jun 27 '20 at 22:19