Discussion:
xticklabel: warning: range error for conversion to character value
gigiolone123
2018-11-23 19:25:18 UTC
Permalink
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.
mmuetzel
2018-11-27 17:06:01 UTC
Permalink
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
Loading...