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:
Plotting color contours in B&W

Subject: Plotting color contours in B&W

From: Todd Welti

Date: 9 Aug, 2012 07:17:22

Message: 1 of 2

I'm having a problem plotting color contour plots in black and white. I've got some areas in the contour which are NaN's. So in the color plot they show up white (transparent on a white background). But I need to plot in B&W for a journal paper. I was hoping to use a hatch pattern to plot the NaN areas. My basic idea is to make a plot with the hatch pattern, then plot the contour plot (in B&W) on top. The NaN's will be tranparent and thus the hatch pattern will show through there and unambiguously show the NaN areas in the contour plot (which are important). BUT, I am loading previously made plots from .fig files (using 'open'), so I can't figure out how to plot the hatch pattern first and have the opened file plot on top of it. It seems that when I use 'open' it just creates a new figure.

...or maybe there is a better way to do this. Any help appreciated.

Subject: Plotting color contours in B&W

From: Kwen

Date: 9 Aug, 2012 14:15:16

Message: 2 of 2

"Todd Welti" <twelti@harman.com> wrote in message <jvvo61$sar$1@newscl01ah.mathworks.com>...
> I'm having a problem plotting color contour plots in black and white. I've got some areas in the contour which are NaN's. So in the color plot they show up white (transparent on a white background). But I need to plot in B&W for a journal paper. I was hoping to use a hatch pattern to plot the NaN areas. My basic idea is to make a plot with the hatch pattern, then plot the contour plot (in B&W) on top. The NaN's will be tranparent and thus the hatch pattern will show through there and unambiguously show the NaN areas in the contour plot (which are important). BUT, I am loading previously made plots from .fig files (using 'open'), so I can't figure out how to plot the hatch pattern first and have the opened file plot on top of it. It seems that when I use 'open' it just creates a new figure.
>
> ...or maybe there is a better way to do this. Any help appreciated.

I'm not sure how else you would do this but if you're having a hard time getting this to work, you might be able to click edit->copy figure and paste onto a new background somewhere else if you're really stuck. The transparency should be kept in the copy.

Tags for 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