axis on plot not displaying

a = (1:100);
b = (a.^2);
plot(a,b)
xlabel = 'time';
ylabel = 'fish';
I have tried using "xlabel('time');" but nothing seems to work, the graph will display and no error will be shown but the labels wont come up?

 Accepted Answer

a = (1:100);
b = (a.^2);
plot(a,b)
xlabel('time')
ylabel('fish')

2 Comments

Before that,
clear xlabel ylabel
just in case you still have the variables xlabel and ylabel stuck in your workspace.
Got it now, thanks!

Sign in to comment.

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!