xticklabel: warning: range error for conversion to character value

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

xticklabel: warning: range error for conversion to character value

gigiolone123
hi



ANM2=[1 2 3];

for i=1:3      
  ABD(i)={"xiao "}     % (it's an example..i want to use string}

endfor

set (gca, 'XTick',ANM2, 'xticklabel',ABD);


i receive this error:
āā疯ȁwarning: range error for conversion to character value
warning: called from
    __axis_label__ at line 31 column 3
    title at line 51 column 8
    Titan_Plot_SingleSystem>Equit at line 368 column 1
    Titan_Plot_SingleSystem at line 223 column 5



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: xticklabel: warning: range error for conversion to character value

mmuetzel
Which version of Octave are you using? I cannot reproduce this error with
Octave 4.4.1.

The following code works as expected and displays the "xiao" label at 1, 2,
and 3:

ANM2=[1 2 3];

for i=1:3      
  ABD(i)={"xiao "}     % (it's an example..i want to use string}

endfor

plot (1:3);
set (gca, 'XTick',ANM2, 'xticklabel',ABD);




--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html