How do I prevent all my axes colormaps in a figure from being updated at once?
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Kristoffer Walker
 el 31 de Mayo de 2019
  
    
    
    
    
    Comentada: Kristoffer Walker
 el 31 de Mayo de 2019
            Folks,
I have a single GUI with several axes.  When I set the current axes to axes 1, and I change the colormap with "colormap(gray)" for example, this changes the colorbars on the other axes to also be gray.  My desired behavior is to control each axes colormap within my GUI indepdently.  I tried the Matlab uploaded functions "freezeColors" and "unfreezeColors", but that does not seem to fix this.
Thank you,
Kris
2 comentarios
Respuesta aceptada
  Stephen23
      
      
 el 31 de Mayo de 2019
        
      Editada: Stephen23
      
      
 el 31 de Mayo de 2019
  
      According to the colormap documentation the syntax that you are using changes the colormap for the entire figure, which is inherited by any axes within that figure. The documentation also states that if you only want to change the colormap of one axes then you need to specify those axes:
axh = axes(...)
...
colormap(axh,...)
Tip: experienced MATLAB users recommend always using explicit graphics handles, as my example code shows, rather than unreliable and unpredictable gca, gcf, etc.
Más respuestas (1)
Ver también
Categorías
				Más información sobre Orange en Help Center y File Exchange.
			
	Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!