Error to put a title on my pie chart

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

Error to put a title on my pie chart

Fernando Cerda
Dear all,
I am using Octave 5.2.
I tried to create a pied chart from health data.  This is the command for the plotting:

figure 1
 pie ([sum(B(:,4)), sum(B(:,5)), (sum(B(:,8))-sum(B(:,6)))], [0, 0, 1]);​
 colormap ([1,0,0;0,1,0;0,0,1;1,1,0;1,0,1;0,1,1]);​
 labels = {'No de Mulheres','No Voluntarios','No Beneficiados'};​
 legend(labels,'Location','southoutside','Orientation','horizontal')​
title('1 Número total de pessoas envolvidas no distrito') 

This is the error

error: title(195): out of bound 28 (note: variable 'title' shadows function)

once you get the error, you cannot use the command "title" anymore.  You have to exit Octave and load it again.

I would greatly appreciate if you can help me to fix the error,

Thanks in advance,

Fernando 


Reply | Threaded
Open this post in threaded view
|

Re: Error to put a title on my pie chart

mmuetzel
Am 14. März 2020 um 09:13 Uhr schrieb "Fernando Cerda":

> Dear all,
> I am using Octave 5.2.
> I tried to create a pied chart from health data.  This is the command for the plotting:
>
> figure 1
>  pie ([sum(B(:,4)), sum(B(:,5)), (sum(B(:,8))-sum(B(:,6)))], [0, 0, 1]);​
>  colormap ([1,0,0;0,1,0;0,0,1;1,1,0;1,0,1;0,1,1]);​
>  labels = {'No de Mulheres','No Voluntarios','No Beneficiados'};​
>  legend(labels,'Location','southoutside','Orientation','horizontal')​
> title('1 Número total de pessoas envolvidas no distrito')
>
> This is the error
>
> error: title(195): out of bound 28 (note: variable 'title' shadows function)
>
> once you get the error, you cannot use the command "title" anymore.  You have to exit Octave and load it again.
>
> I would greatly appreciate if you can help me to fix the error,

You seem to have created a variable named "title" before you issued the above commands. The error message seems to be quite explicit about that.
Try "clear title" before executing your commands again.

HTH
Markus


Reply | Threaded
Open this post in threaded view
|

Re: Error to put a title on my pie chart

mmuetzel
Am 14. März 2020 um 12:12 Uhr schrieb "Fernando Cerda":
> Markus,
> Thanks very much for your help.  It works now.
>
> Thanks again for your help,
>
> Fernando

You're welcome.
Please, keep the mailing list in CC and use bottom posting if possible.

Markus


> ________________________________
> From: "Markus Mützel" <[hidden email]>
> Sent: Saturday, March 14, 2020 9:31 AM
> To: Fernando Cerda <[hidden email]>
> Cc: [hidden email] <[hidden email]>
> Subject: Re: Error to put a title on my pie chart
>
> Am 14. März 2020 um 09:13 Uhr schrieb "Fernando Cerda":
> > Dear all,
> > I am using Octave 5.2.
> > I tried to create a pied chart from health data.  This is the command for the plotting:
> >
> > figure 1
> >  pie ([sum(B(:,4)), sum(B(:,5)), (sum(B(:,8))-sum(B(:,6)))], [0, 0, 1]);​
> >  colormap ([1,0,0;0,1,0;0,0,1;1,1,0;1,0,1;0,1,1]);​
> >  labels = {'No de Mulheres','No Voluntarios','No Beneficiados'};​
> >  legend(labels,'Location','southoutside','Orientation','horizontal')​
> > title('1 Número total de pessoas envolvidas no distrito')
> >
> > This is the error
> >
> > error: title(195): out of bound 28 (note: variable 'title' shadows function)
> >
> > once you get the error, you cannot use the command "title" anymore.  You have to exit Octave and load it again.
> >
> > I would greatly appreciate if you can help me to fix the error,
>
> You seem to have created a variable named "title" before you issued the above commands. The error message seems to be quite explicit about that.
> Try "clear title" before executing your commands again.
>
> HTH
> Markus
>