Borrar filtros
Borrar filtros

Two y-axis colors

540 visualizaciones (últimos 30 días)
Lynn el 30 de Oct. de 2019
Comentada: Lynn el 2 de Nov. de 2019
Hello, and thanks for the help given to me earlier.
I have created -- thanks to MATLAB help -- a graph with two y axes. The default colors appear to be blue and red. Is there a way that I can make all the lines and labels black? I can't seem to find that way anywhere.
Many thanks.

Respuesta aceptada

Thomas Satterly
Thomas Satterly el 30 de Oct. de 2019
Assuming you did something similar to the code below, you can access the axis properties directly and change the color to whatever you want.
% Create a figure and axis with 2 Y axes
ax = axes; % or ax = gca();
% Set the color of each axis to black
ax.YAxis(1).Color = [0 0 0];
ax.YAxis(2).Color = [0 0 0];
  1 comentario
Lynn el 2 de Nov. de 2019
Many thanks. That did it!

Iniciar sesión para comentar.

Más respuestas (0)


Más información sobre Graphics Object Properties 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