plot(x,y) does not show x-cordinate and y-ordinates
Show older comments
whenever I plot something like using plot(x,y), the plot does not show x-cordinate and y-ordinates details beside the axis as it normally does. What should I do to bring back x-ordinate and y-cordinate details in the figure?
1 Comment
Wayne King
on 17 Sep 2011
Hi Anindya, You should show an example of what you mean by this.
Wayne
Answers (1)
Wayne King
on 18 Sep 2011
Hi Anindya, Please show the MATLAB code that you are using to produce that plot.
Ex:
x = 0:0.01:2*pi;
y = sin(x);
plot(x,y);
3 Comments
Anindya Guha
on 18 Sep 2011
Wayne King
on 18 Sep 2011
This is very strange Anindya, just to be clear, you are not seeing xticks and yticks in MATLAB, not after you export the figure to some format? By default, you should have xticks and yticks with the above code.
A couple things, are you sure that you are using MATLAB plot. If you enter
>>which plot
do you get something back like:
matlab\toolbox\matlab\graph2d\plot
If you execute the following:
x = -pi:0.01:pi;
y = sin(x);
plot(x,y);
get(gca,'xtick')
get(gca,'ytick')
what is returned?
Anindya Guha
on 18 Sep 2011
Categories
Find more on 2-D and 3-D Plots 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!