Set a custom default label
7 views (last 30 days)
Show older comments
Almost all my plots have time on the x-axis so I was wondering if I could change the label to read 'Time [sec]' by default.
I have been looking into the get(groot,'factoryAxes') properties and it seems I can change the xlabel with set(groot,'defaultAxesXlabel'). However, when I change it to set(groot,'defaultAxesXlabel','Time [sec]') I get an error:
Error using gca While setting the 'Parent' property of Axes: Value must be a handle.
Error in newplot (line 68) ax = gca(fig);
Is this the right approach? Is it even possible to do this?
0 Comments
Answers (1)
Remco Doodkorte
on 20 Apr 2016
I have a bunch of plots to make and encountered the same problem.
I've been trying to do exactly the same and tried both: set(0,'defaultAxesXlabel','MyLabel') set(groot,'defaultAxesXlabel','MyLabel').
Gives my exactly the same problem.
Error using axes While setting the 'Parent' property of 'Axes': Value must be a handle.
Error in subplot (line 481) ax = axes('Units', 'normalized', 'Position', position, ...
R2015b
Anyone who knows the problem?
0 Comments
See Also
Categories
Find more on Axis Labels in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!