How do I bind a specific value to a color using colormap?
    14 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Denis Perotto
      
 el 15 de En. de 2019
  
    
    
    
    
    Respondida: Walter Roberson
      
      
 el 16 de En. de 2019
            I'm plotting a 2D contour plot using contourf(X, Y, Z). How can I create a custom colormap, where certain color would be bound to a curtain value? For example:
100 - [1 0 0]
200 - [1 0.5 0]
1000 - [1 1 0]
It would be also nice to make all values below 100, for example, [0.5 0 0] and all values above 1000 - [1 1 0.5].
Please, do not suggest colormap editor. If this task is impossible for colormap, suggest me another function for 2D plots (maybe, plot it dot by dot)
2 comentarios
  Walter Roberson
      
      
 el 16 de En. de 2019
				To confirm: if the input value were 100*(1+eps) then the output should be transparent because the value would not be any of the ones you listed?
Respuesta aceptada
Más respuestas (1)
  KSSV
      
      
 el 15 de En. de 2019
        1 comentario
  Denis Perotto
      
 el 16 de En. de 2019
				
      Editada: Denis Perotto
      
 el 16 de En. de 2019
  
			
		Ver también
Categorías
				Más información sobre Red 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!


