Error using set - XColor and YColor
Show older comments
When I try to change the X color and Y color of plots using this code:
set(gca,'XColor','none')`
I get the following error:
Error using set Bad property value found. Object Name : axes Property Name : 'XColor'.
The same thing happens with 'YColor', but other properties (such as 'Color') are fine.
I'm using version R2012b.
Thanks in advance for help
Answers (1)
Here is the official list of all public axes properties:
Although XColor and YColor are listed in the online documentation, they may not be supported in your MATLAB version. To know what properties are supported by your version, you should open the program help, not the online help as the online help always applies to the most recent version.
This list also tells you what values are permitted, and I do not see 'none' as being a permitted value. If you wish to turn off the axes then use the visibility property.
Categories
Find more on Graphics Object Properties in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!