plot : strange behaviour

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

plot : strange behaviour

Octave - General mailing list
i've a variable array :
ValEquity

size(ValEquity)
ࣿans =
   839     1

plot(ValEquity);

https://gyazo.com/f2b32cbcea5c143d9b3839a10c268bc9

plot(ValEquity(1:800));

https://gyazo.com/47535b79f44c1fb560ce51f3fba95538

Can i avoid space if i want plot all element?



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


Reply | Threaded
Open this post in threaded view
|

Re: plot : strange behaviour

Przemek Klosowski-7
On 5/24/19 7:59 AM, LucaLuca via Help-octave wrote:
> i've a variable array ... ValEquity  ...  size(ValEquity) ...  839     1
>
> plot(ValEquity);
> ...
> plot(ValEquity(1:800));
> ...
>
> Can i avoid space if i want plot all element?
>

plot() has to make a decision about the extent of the axis and the
position of axis markers. It tries to make them nice and round: it makes
more sense to place markers at 0, 200, 400, 800, 1000   than 1  210.5  
420   629.5, but as a consequence, you get the extra space between 839
and 1000.

If you want to override that, you have to declare your own axis e.g.
by    axis([1,839])



Reply | Threaded
Open this post in threaded view
|

Re: plot : strange behaviour

Octave - General mailing list