Combining two contourplots in one plot

6 次查看(过去 30 天)
Hi,
I am trying to combine two contour plots in one single plot. The problem is, that the results is not really satisfying. First you can see the first contourplot. The data is a 571x96 Matrix both times with values from 1 to 1e-300.
The second plot looks like that
If I combine them it looks like that
What I would like to see is still the colours of the second plot just overlayed with the black "circles" from the first plot. But somehow the colors from the second plot are lost. I use this approach:
Do you have any ideas how to make the final plot look better?
Thank you very much
P.S.> I am a MATLAB noob :) and I am using Matlab R2013a

采纳的回答

Walter Roberson
Walter Roberson 2015-10-30
With values as small as 1e-300 and at most 1 (both plus noise), log() of the values can be as low as -690 and as high as 0 (plus noise)
Then you combine that with a plot of values between 1 and 1e-300, so your combined plot has a data value range between -690 and +1. That change of range is going to change which values map to which color, as you have not given a caxis() command to determine the range of data used for coloring.
What I recommend you do is plot the color one first (which I think is actually the first of the two plots, not the second) and then call upon the File Exchange contribution named "freezeColors". That will lock in the colors for it. Then plot your black and white unfilled contours on top.
  1 个评论
jan mischke
jan mischke 2015-11-1
编辑:jan mischke 2015-11-1
I don't really know what this File Exchange means. I downloaded the file and unzipped it. Now I got several .m files. Do I copy the content into my script? The problem is that in the end I need to invoke my Matlab script with a main.c. So I need to automate the plots. So opening different script would not be the best solutions. Is there any better way without this freezeColor? I can update to R2014b if there is a better solution in that version. I found something http://www.mathworks.com/help/matlab/ref/patch-properties.html which could maybe help me with my problem but I really dont understand anything written there. Whats a Face etc...?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Contour Plots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by