[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with plotting graphic
From: |
c. |
Subject: |
Re: problem with plotting graphic |
Date: |
Tue, 9 Jul 2013 15:29:33 +0200 |
On 9 Jul 2013, at 10:59, Mehdi Daakir <address@hidden> wrote:
> Hi,
>
> I'm a student and using octave for my tests and plotting.
> I have this problem while plotting a figure When I force the intervalle of
> scale, Octave don't put the number '0' but a '5....e-17' in the graphic.
>
> here is an example of the code for plotting :
> figure(1)
> subplot(221)
> hold on
> plot(x_img1_c1*1e6-mean(x_img1_c1)*1e6)
> title("coord i spot 1")
> ylabel("Ecart a la moyenne en um")
> set(gca,'ylim',[-1 1],'ytick',-1:0.1:1)
> hold off
>
>
> I don't know how can I fix this problem.
You can make sure the your ytick includes the exact value 0:
t = [linspace(-1, 0, 11) linspace(0.1, 1, 10)];
set(gca,'ylim',[-1 1],'ytick', t);
or manually change the labels on the y axis by setting the property
'yticklabel':
set(gca, 'yticklabel', {'-1', '-.9', … , '0', '0.1', … , '1'});
> It's not convinent for the professionnal graphics to have this value instead
> of 0. Here is an exemple in the file attached of the result.
If you need more "professional" looking grafics try having a look at
http://home.gna.org/veusz/
I often use it for my publications saving data from Octave and then importing
in veusz.
> Thank you for your help.
>
> Best regards,
>
> Mehdi
HTH,
c.