xticklables

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

xticklables

Raag Saluja
Hi! 

I tried making a bar graph with categorical data. However, the xticklabels are not coming below the bars. Can you please help?

PFA a screenshot of the same.

Thank you and regards,
Raag Saluja
Research Scholar
Department of Zoology
Faculty of Science
Dayalbagh Educational Institute
INDIA



Screenshot 2019-10-30 at 1.31.38 PM.png (29K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: xticklables

Pantxo
Raag Saluja wrote
> Hi!
>
> I tried making a bar graph with categorical data. However, the xticklabels
> are not coming below the bars. Can you please help?

You first need to change the value of xticks so that they match the xdata of
your bar graph:

x= (1.5:1.5:6);
y = [5 20 77 19];
bar (x, y)
set (gca, "xtick", x, "xticklabel", {"a", "b", "c", "\\alpha"})

Pantxo



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