Different color scale?

64 visualizaciones (últimos 30 días)
Ara
Ara el 25 de Nov. de 2024 a las 11:04
Comentada: Ara el 27 de Nov. de 2024 a las 8:09
Dear all,
I have two different dataset one in txt format (ROTI output) and another in xlsx format(S4 output).I wanted to plot different scalebar with different color so that I can recognize these two data set. Would you please tell me the command of it?
Thank you,
Aramesh
  4 comentarios
Mathieu NOE
Mathieu NOE el 25 de Nov. de 2024 a las 16:02
hello @Ara
it would help us (and you BTW) if you could share a working code and the data
all the best
Ara
Ara el 26 de Nov. de 2024 a las 6:45
Hi Mathieu NOE,
Thank you for your comment. Unfortunately, I cannot share the data.
Best wishes,

Iniciar sesión para comentar.

Respuestas (2)

Image Analyst
Image Analyst el 25 de Nov. de 2024 a las 17:48
You need to use the colormap function to set the colormap for each axes independently. So display one image, set the colormap, then display the other and call colormap again with the other colormap. If you're plotting line curves instead of displaying images, there is a 'Color' (or maybe 'LineColor' option in plot to let you set the specific color of each curve.
help colormap
colormap - View and set current colormap This MATLAB function sets the colormap for the current figure to the specified predefined colormap. Set Colormap colormap map colormap(map) colormap(target,map) cmap = colormap(___) Get Current Colormap cmap = colormap cmap = colormap(target) Input Arguments map - Colormap for new color scheme colormap name | three-column matrix of RGB triplets | 'default' target - Target Figure object | Axes object | PolarAxes object | GeographicAxes object | standalone visualization Output Arguments cmap - Colormap values three-column matrix of RGB triplets Examples openExample('graphics2/ChangeColormapUsedForPlotExample') openExample('graphics2/ChangeColormapThenSetItBackToDefaultExample') openExample('graphics/ColormapSpecifyAxesTiledLayoutExample') openExample('graphics2/SpecifyNumberOfColorsForColormapExample') openExample('graphics2/CreateCustomColormapExample') openExample('graphics2/ReturnColormapValuesUsedInPlotExample') openExample('graphics/ColormapReturnFromTiledLayoutExample') openExample('graphics2/ChangeColormapForFigureWithImageExample') See also colorbar, ind2rgb, hsv2rgb, rgbplot, Colormap Editor Introduced in MATLAB before R2006a Documentation for colormap doc colormap
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
  3 comentarios
Image Analyst
Image Analyst el 26 de Nov. de 2024 a las 14:44
I don't know what you want. What color ranges do you want for the left colorbar and right colorbar, and what numerical data values do the top and bottom of the colorbars represent?
Ara
Ara el 27 de Nov. de 2024 a las 8:09
Dear Image Analysis,
I want to show different threshold for ROTI (0-0.5) and S4 (0-0.3) in one map. ALso, show different color bar. I set "jet" for one of them and "hot" for another one but it does not appear on the plot.

Iniciar sesión para comentar.


Walter Roberson
Walter Roberson el 25 de Nov. de 2024 a las 18:53
caxis([0 0.3]);
That is affecting the current axis.
caxis([0 0.5]);
That too is affecting the current axis. Which appears to be the same axis as before.
Each axis has only one CLim axis property, so only one caxis() can be in effect at the same time in each axis.
If you need two different caxis() then you need two different axes.
  4 comentarios
Rik
Rik el 26 de Nov. de 2024 a las 9:39
You're aware you didn't set a colormap for ax2?
Ara
Ara el 26 de Nov. de 2024 a las 9:54
It means that I need to add it here like this. What to write instaed of "jet" to make a difference between them?
% Add colorbar for ROTI
colormap(ax2, jet);
c2 = colorbar('Location', 'westoutside');
c2.Label.String = 'ROTI (TECU/min)';
caxis(ax2, [0 0.5]); % Set color axis limits for ROTI
end

Iniciar sesión para comentar.

Categorías

Más información sobre Orange en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by