Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
waterfall colours

Subject: waterfall colours

From: Dave Brackett

Date: 20 Oct, 2008 16:46:02

Message: 1 of 3

I have created a waterfall plot showing several sets of FFT data (using the built in waterfall function).

I want each set to be a different colour, but the only colouration that seems possible is in the z direction. My sets are stacked in the y or x direction. Any ideas how I can achieve this? Thanks.

Subject: waterfall colours

From: Matt Hughes

Date: 20 Oct, 2008 17:12:17

Message: 2 of 3

Try this out! It grabs the color data from a sideways plot and applies it to a right-way up plot.

h = waterfall(Z, X, Y);
colors = get(h, 'CData');
h2 = waterfall(X, Y, Z);
set(h2, 'CData', colors);

Subject: waterfall colours

From: Dave Brackett

Date: 20 Oct, 2008 19:20:04

Message: 3 of 3

Matt Hughes <zapwow@gmail.com> wrote in message <13906319.1224522768423.JavaMail.jakarta@nitrogen.mathforum.org>...
> Try this out! It grabs the color data from a sideways plot and applies it to a right-way up plot.
>
> h = waterfall(Z, X, Y);
> colors = get(h, 'CData');
> h2 = waterfall(X, Y, Z);
> set(h2, 'CData', colors);

yeah that works! nice workaround. thanks.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us