overlap ylabel with values axis
15 views (last 30 days)
i have this problem both for x axis anz y axis, how can i solve?
another question: how can i convert input data to character? Sometimes i use the option x='1.2e7' but i would to generalize and use it both for legend and write a new file. I have tried to use num2str but the number 1.2e7 becomes 12000000
Walter Roberson on 10 Mar 2022
format long g
x = 1.2e7
num2str() invokes sprintf() internally (except for integers, if I recall -- I think it calls int2str() for those.)
compose() can be useful for outputing arrays; sprintf() is a nuisance for outputing arrays of different types.
However... if you need to be able to distinguish between x = 12.e6 and x=1.2e7 and automatically output exactly the same way that it was input, then you are going to need to input as character (or string) and str2double() when you need the numeric form.
AndresVar on 10 Mar 2022
many ways to modify the label position: modify position property, if in latex add \quad, etc
the easy way is to control the horizontal alignment
a = (1:3)/10