Plotting a Single Point with Gnuplot

Sometimes simple things can be very hard to do. For instance plotting a single point with gnuplot. Luckily, there are two horrible hacks which allow you to accomplish this from the gnuplot prompt (putting the point’s coordinates in a file is of course just the easy way out…).

Method 1:
gnuplot> plot “< echo ‘x   y’”

(Set x and y to your point’s x and y coordinate)

Method 2:
gnuplot> plot “-”     (press shift enter)
x    y        (press enter)
e

4 Responses to “Plotting a Single Point with Gnuplot”

  1. Marcos Says:

    This information is really helpful.
    I would gladly strangle all the people who helped gnuplot arrive to be the most important plotting tool software without even thinking of resolving this banal task.

  2. Nathan Says:

    This problem plagued me as well. Thanks for posting this fix.

  3. Kyle Says:

    Many thanks for this! Even 4 years after your post, it comes in handy!

    Do you know if there is now any easier way to do this in newer versions of gnuplot?

  4. Ryan J Says:

    The fact that the gnuplot folks skip over basic plotting entirely and jump straight to plotting custom functions and sinusoids is more than an oversight. It shows why there are so few good software engineers in the world.

Leave a Reply