Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Matlab Axis Question

Status
Not open for further replies.

pgstein

Electrical
Sep 1, 2005
1
Hello,

I am creating a plot through a ".m" file. The problem I am having is that when I display the plot, the y-axis is scaled in the format 1.6 x 10-3 instead of 0.0016. Is there a property that sets the number format of the axis? I figuered it would be easy, but I have searched for sometime and havent had any luck. Thanks in advance,

Paul
 
Replies continue below

Recommended for you



The tick labels are string values. You can manually set them however you want:

set(gca,'XTickLabel',{'0.0000';'0.0016';'0.0032'})

If you want full automation, use 'get' to read in the current values, 'sprintf' to set the numerical format, and 'set' to update.

CV
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor