Labels not showing up on Graphs

67 views (last 30 days)
Jason on 12 Dec 2014
Commented: Jason on 12 Dec 2014
This has been driving me crazy all morning. for some reason, my request to label an axes isn't working:
Yet, from the command window below, the strings are being assigned - they are just not showing up on the graph.

Accepted Answer

Robert Cumming
Robert Cumming on 12 Dec 2014
Edited: Robert Cumming on 12 Dec 2014
you are creating variables called xlabel and ylabel, you need to do:
xlabel ( gTitles(1) )
ylabel ( gTitles(2) )
or better use the axes handle:
xlabel ( handles.axes1, gTitles(1) )
ylabel ( handles.axes1, gTitles(2) )
Note: You will need to clear the variables you created by mistake.
  1 Comment
Jason on 12 Dec 2014
Oh yes, the equals sign...Should have spotted it. Thankyou very much. Jason

Sign in to comment.

More Answers (0)


Find more on Specifying Target for Graphics Output 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!

Translated by