Borrar filtros
Borrar filtros

Combining two contourplots in one plot

1 visualización (últimos 30 días)
jan mischke
jan mischke el 30 de Oct. de 2015
Editada: jan mischke el 1 de Nov. de 2015
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 30 de Oct. de 2015
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 comentario
jan mischke
jan mischke el 1 de Nov. de 2015
Editada: jan mischke el 1 de Nov. de 2015
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...?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by