matlab更改网格线的颜色而不更改轴标签或框的颜色

收录时间:2019-01-09
资源分类:Matlab 工具:MATLAB 7.0.4 (R14SP2)

更改网格线的颜色而不更改轴标签或框的颜色

 

gridcolor

Use this function to change the color of gridlines to a color different to the label and box color, which is currently not implemented in Matlab.

-> http://www.mathworks.com/support/solutions/data/1-1PAYMC.html?solution=1-1PAYMC)

 

The general syntax for a call is:

 

gridcolor([ax1, ax2, ...], c_x, c_y, c_z)

 

Here ax1, ... are handles to existing axes (optional argument) and c_xyz are color specifications (e.g. 'r' or [1 0 0], also optional). If no axis handle is supplied, the call goes to the current axis (gca), if no color is supplied a standard color, which is defined in the first executable line of the file, is used.

The function should be called after the plot has been created and the grid has been turned on.

 

Example:

plot(1,1)

grid on

gridcolor([1 0 0], 'b')

 

This function is no longer tested for Matlab 6.5 or lower and will most likely not work for these versions. It should run on Matlab 7.0 or higher.

 

For further examples please refer to the examples in the header of the file.

 

Cheers

Sebi

 

PS.: I have included some lines from Yair Altmans "PropListener" example

文件下载列表
gridcolor.zip (31.53KB)  
附件内容(只显示3中的1个)
gridcolor.m  
更多

目前尚无评论

用户反馈   关于我们
Copyright (©) ZHIHUISHI.COM 2013 All Rights Reserved.
京ICP备14040384号