Weird Gnuplot problem

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

Weird Gnuplot problem

Dave Horsfall
Gnuplot 5.0.4, on MacOS 10.11.6.

For reasons that are not particularly germane, I am trying to determine
the area of a square vs. a circle, given a piece of string of length "x".  
I have worked it out in simple maths, but I want to plot it.

gnuplot> set xtics 0,1,100
gnuplot> plot (x*x)/16, pi * x

But no matter what I do, I get a partial graph, no xtics on the left,
extending to 10 on the right, with the expected parabola and angled line
intersecting at x=0.

What I really want to see is the parabola crossing the straight line,
around pi * 16. so where have I stuffed up?

Thanks.

--
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."

------------------------------------------------------------------------------
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Weird Gnuplot problem

Ethan A Merritt-2
On Saturday, 30 July 2016 01:50:40 PM Dave Horsfall wrote:

> Gnuplot 5.0.4, on MacOS 10.11.6.
>
> For reasons that are not particularly germane, I am trying to determine
> the area of a square vs. a circle, given a piece of string of length "x".  
> I have worked it out in simple maths, but I want to plot it.
>
> gnuplot> set xtics 0,1,100
> gnuplot> plot (x*x)/16, pi * x
>
> But no matter what I do, I get a partial graph, no xtics on the left,
> extending to 10 on the right, with the expected parabola and angled line
> intersecting at x=0.
>
> What I really want to see is the parabola crossing the straight line,
> around pi * 16. so where have I stuffed up?

The default range on x is [-10:10], which is what you have.
You asked for xtics starting at 0 and going to 100, which you also have.
IOW you got just what you asked for.

Maybe you intended "set xrange" rather than "set xtics"?


------------------------------------------------------------------------------
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Weird Gnuplot problem

Dave Horsfall
On Fri, 29 Jul 2016, Ethan A Merritt wrote:

[ ... ]

> > What I really want to see is the parabola crossing the straight line,
> > around pi * 16. so where have I stuffed up?
>
> The default range on x is [-10:10], which is what you have.
> You asked for xtics starting at 0 and going to 100, which you also have.
> IOW you got just what you asked for.
>
> Maybe you intended "set xrange" rather than "set xtics"?

Bingo!  Many thanks.

--
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."

------------------------------------------------------------------------------
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Loading...