Replot

The replot command without arguments repeats the last plot or splot command. This can be useful for viewing a plot with different set options, or when generating the same plot for several devices.

Arguments specified after a replot command will be added onto the last plot or splot command (with an implied ',' separator) before it is repeated. replot accepts the same arguments as the plot and splot commands except that ranges cannot be specified. Thus you can use replot to plot a function against the second axes if the previous command was plot but not if it was splot, and similarly you can use replot to add a plot from a binary file only if the previous command was splot.

N.B.—use of

  plot '-' ; ... ; replot

is not recommended—gnuplot does not store the inline data internally. Since replot appends new information to the previous plot and then executes the modified command, the '-' will ask once more for the data. '-' is intended for situations where it is useful to have data and commands together, e.g., when gnuplot is run as a sub-process of some front-end application. Some of the demos, for example, might use this feature.

See command-line-editing for ways to edit the last plot (splot) command.