Octave plotting x axis precision

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

Octave plotting x axis precision

wangboyuan
Hi,

I wonder how can I increase the precision of the x/y axis when I am plotting the graph.

I have initialised the >>option long
and I have a data set for example:

x(1:3)
ans =

   736330.576631944
   736330.576643519
   736330.576655093

 y(1:3)
ans =

  -62
  -63
  -62

and when I do plot(x(1:3),y(1,3)), i can only see a straight vertical line between -62 and -63, it seems like that the x axis doesnt have enough decimal places to recognise the changes.

 get(gca, 'xticklabel')
ans =
{
  [1,1] = -2e+006
  [1,2] = -1.5e+006
  [1,3] = -1e+006
  [1,4] = -500000
  [1,5] = 0
  [1,6] = 500000
  [1,7] = 1e+006
  [1,8] = 1.5e+006

This is what I get from the get gca() function. Is there anyway to increase the precision of the x axis so that I can see the data point moving ?

Thank you very much for the help
Reply | Threaded
Open this post in threaded view
|

Re: Octave plotting x axis precision

marco atzeri-2


On 18/03/2016 11:03, wangboyuan wrote:

> Hi,
>
> I wonder how can I increase the precision of the x/y axis when I am plotting
> the graph.
>
> I have initialised the >>option long
> and I have a data set for example:
>
> x(1:3)
> ans =
>
>     736330.576631944
>     736330.576643519
>     736330.576655093
>
>   y(1:3)
> ans =
>
>    -62
>    -63
>    -62
>
> and when I do plot(x(1:3),y(1,3)), i can only see a straight vertical line
> between -62 and -63, it seems like that the x axis doesnt have enough
> decimal places to recognise the changes.

it is a know limitation of fltk that uses only single precision.
Try using gnuplot as graphics or rescale the numbers to plot



_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Octave plotting x axis precision

wangboyuan
Thank you very much !! Problem sorted.