How to manually define value range in colormap

2 vues (au cours des 30 derniers jours)
EcoBase
EcoBase le 15 Nov 2018
Commenté : KSSV le 16 Nov 2018
Hi. I'm trying to create an image from a txt file which contains X, Y, Z values, in which Z is the pixel intensity. (thanks to this thread :) -> https://kr.mathworks.com/matlabcentral/answers/339147-how-to-create-an-image-in-matlab-from-txt-file. I'm only a beginner to Matlab, and my questions may sound a bit silly. My apology!
I plotted as below:
1) But I'd like to give a certain range a certain color as the image below (the image was retrieved from Hegedüs et al. 2007 Applied Optics):
2) Or in a greyscale range below (from Barta et al. 2014 Applied Optics):
I'm so sorry to ask too much, but could anyone help me out please?
Thank you in advance.

Réponse acceptée

KSSV
KSSV le 15 Nov 2018
Read about caxis it will help you to define the range in the colormap.
  4 commentaires
EcoBase
EcoBase le 16 Nov 2018
Thank you so much! I can't express my gratitude enough. I tried with your code, and it worked. Thank you!
By the way, I'd like to colors in grayscale to values greater than 16. Would you please teach me how to do that as well?
Thank you and I'm so sorry to bother you.
KSSV
KSSV le 16 Nov 2018
What happens when you specify black color in RGB code?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Orange dans Help Center et File Exchange

Tags

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by