Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: Plots: problem with ticks and legend
Replies: 1   Last Post: Dec 6, 2012 3:46 PM

 Messages: [ Previous | Next ]
 Zeineb Posts: 1 Registered: 12/6/12
Plots: problem with ticks and legend
Posted: Dec 6, 2012 12:34 PM

Hello,

First I wanted to know if there was a way to use crossing ticks on Matlab plots? (I only found in and out ticks, for now).
Also, is it possible to keep ticks on the x and y axis, but remove them from the top and bottom axis (while keeping the box)?

Finally I have a problem with a function I used to be able to move the legend, but I still have no idea of how to fix it.
Here are the function and the variables:

%
afStartingPoint_FU(1) = (afStartingPoint(1) - afXAxisLimits(1) )/ (afXAxisLimits(2) - afXAxisLimits(1) )* fXAxisLength + fXAxisPosition;
afStartingPoint_FU(2) = (afStartingPoint(2) - afYAxisLimits(1) )/ (afYAxisLimits(2) - afYAxisLimits(1) )* fYAxisLength + fYAxisPosition;
afEndingPoint_FU(1) = (afEndingPoint(1) - afXAxisLimits(1) )/ (afXAxisLimits(2) - afXAxisLimits(1) )* fXAxisLength + fXAxisPosition;
afEndingPoint_FU(2) = (afEndingPoint(2) - afYAxisLimits(1) )/ (afYAxisLimits(2) - afYAxisLimits(1) )* fYAxisLength + fYAxisPosition;
%
handleToAnnotation1 = annotation( ...
strAnnotationType, ...
[afStartingPoint_FU(1) afEndingPoint_FU(1)], ...
[afStartingPoint_FU(2) afEndingPoint_FU(2)]) ;

Thanks a lot for your help!!

Date Subject Author
12/6/12 Zeineb
12/6/12 dpb