gnuplot: display only the roots.

Posted on Stack Overflow See other posts from Stack Overflow
Published on 2009-06-10T18:27:22Z Indexed on 2010/03/31 0:23 UTC
Read the original article Hit count: 560

Filed under:

Hi,

Gnuplot, a great package ... I'm in love with it. But we can have our tiffs as well, as any couple :-) This time, I wanted to simply plot the roots of an equation: say a quadratic to keep things simple. However, I only want two nice round dots appearing on the x-axis representing the point where the quadratic crosses the x-axis or y=0 axis. In other words the roots (when they are real that is). I don't want to do this with datafile ... I want gnuplot to calculate the roots and plot them.

First off, my attempts: single points aren't really what gnuplot would have you plot, it likes a good wide range of values. Preferably filling up the whole width of your canvas.

It's possible to locate a rectangle at a certain coordinate on your plot, but I wanted a round point. Currently I'm chasing up how to do a tiny filled polygon at that point. I have tried the "samples" option bu it doesn't seem useful.

Also though about defining a dirac-delta function so that only one point would be highlighted (though two would be needed).

ANy suggestions welcome, thanks.

© Stack Overflow or respective owner

Related posts about gnuplot