a command for having the ygrid on only , on figure , with set(gca , ),, ... .. ...How ?
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
, So I dont have to take out the xgrid manualy for big number of figures
Thanks
0 comentarios
Respuesta aceptada
Walter Roberson
el 22 de Dic. de 2012
set(gca, 'YGrid', 'on', 'XGrid', 'off')
5 comentarios
Image Analyst
el 22 de Dic. de 2012
Editada: Image Analyst
el 22 de Dic. de 2012
Try this. It works perfectly fine:
y=rand(1,20);
plot(y);
set(gca, 'YGrid', 'on', 'XGrid', 'off')
Your mistake was that you did this:
gca=figure('Units','inches','Position', [7.5 5.5 6 4]); %[left, bottom, width, height]:
This overwrote the built-in gca with a figure handle. DON'T DO THAT! So now gca is a figure handle of the figure you just created instead of being (automatically) the handle of the axes that gets created on the figure. Using a figure handle instead of an axes handle like Walter instructed you to will give you an error almost exactly what you shared.
Más respuestas (0)
Ver también
Categorías
Más información sobre Downloads 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!