|
From: | Raag Saluja |
Subject: | Re: categorical bar graph |
Date: | Tue, 29 Oct 2019 17:12:19 +0530 |
On Mon, Oct 28, 2019 at 1:15 AM Raag Saluja <address@hidden> wrote:Hi! I have to make a bar graph and I want to change the x values to names. I tried the Matlab tutorial as I couldn't find that in octave:x = categorical ({'small', 'medium', 'large', 'extra large')};x= reordercats (x, {'small', 'medium', 'large', 'extralarge');y = [5 20 77 19]bar(x,y)However, I got an error message. PFA the screenshot. Can you please help?Thank you and regards,Raag SalujaResearch ScholarDepartment of ZoologyFaculty of ScienceDayalbagh Educational InstituteDayalbaghAgraINDIAIs this what you wanted? I'm not familiar with categorical in MATLAB.y = [5 20 77 19];
bar(y);
set(gca,"xticklabel",{'small', 'medium', 'large', 'extra large'});The various properties each object have account for most of Octave's flexibility. Sometimes, however, it can be hard to know where to look. In this case, I modified the axes directly - I did not set labels through the bar function. Here are the axes properties I just used.
[Prev in Thread] | Current Thread | [Next in Thread] |