How to modify the format of axises in curve fitting tool ?

I am working on curve fitting and I got a problem when I tired to modify the axis format in curve fitting tool. There seems no tools, windows or setting for axis format and I didn't find the answer in its help, too.
I want to edit the interval between tick marks, interval between lables, major unit and minor unit. And I need to reverse the values of x_axis from lower->higher to higher->lower. (Actually the data I input for x is from higher values to lower ones, but the cftool changes it into lower->higher way automatically..I don't know why.)
All these happen during my curve fitting progress. Or can I modify the format in other ways? Please help. Thank you so much.

 Accepted Answer

You cannot directly modify the interval between tick marks, but you can set the axis XTick or YTick properties to whatever values you want the ticks to appear at.
The labels are (usually) at every tick. You can set the axis XTickLabel and YTickLabel to a cell array of strings, one string per tick mark.
I am not sure what you mean by "major unit" and "minor unit".
To reverse the order, set the axis property XDir to 'reverse' (usually 'normal')
The plot routines do not pay attention to the order of the x data you supply: they follow the XDir / YDir for ordering.
The properties of the axis can be changed through the set() command. There is no particular tool for setting them as they differ from plot to plot. There are ways to change the defaults, but in my experience those are more trouble then they are worth.
You can use the property inspector too look at the axis properties.

6 Comments

Thank you so much for answer my question!
I can understand the way to modify the axis property at Figure window. However, I am not sure how to set the axis properties in cftool window. Could you please explain that for me? Thanks again.
The cftool window _is_ a figure. You just have to find its figure handle and then from there you can find the axes handle.
I don't think I understand what you said well. In a figure window which I get from a plot command, I can find Property Editor from View. However, I cannot find such editor in Curve Fitting Tool window, neither from View nor Tools.
Could you please tell me where to find such editor in Curve Fitting Tool window? My Matlab edition is 7.12.0(R2011a).
I do not have access to cftool, so I cannot test it myself.
You can use
figs = findobj(allchild(0),'type','figure')
to get the handles of all the current figures (including any windows that cftool has opened.)
When you figure out which one of them you are interested in, you can invoke the property inspector yourself, such as via
propedit(figs(3))
By the way, you do not need to use the property inspector to change properties; it is just convenient. If you are able to figure out the handle for the axes you are interested in, then you can use set() to apply properties to the axes.
Thank you !!!
I figured out the problem finally. Actually, click File->print to figure at the curve fitting window, a new figure window comes out and all the axises can be edited in this window.
Thank you, Walter! And happy dragon year!

Sign in to comment.

More Answers (0)

Categories

Products

Community Treasure Hunt

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

Start Hunting!