Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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
Joined
Sep 1, 2005
Messages
1
Location
US
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
 


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

Back
Top