Removing the path name of the data when plotting in gnuplot

10,692

The filename is the default title. If you do not want it to be shown, just turn it off:

plot "/path/to/file" notitle
Share:
10,692
user1882134
Author by

user1882134

Updated on June 05, 2022

Comments

  • user1882134
    user1882134 almost 2 years

    I am relatively new to gnuplot and I am trying to plot some data and save it to a png file for a report. I am running gnuplot from a java-program using exec("gnuplot") but whenever I try to read data from a file and plot it, the plot contains the full path name of the datafile and prints it over part of my plot.

    This makes the plot look rather ugly and unfit for my report. Is there a command or something that I can use to remove the path name or do I have to use Photoshop to render it away manually after generating a .png?

  • user1882134
    user1882134 over 11 years
    Thanks! The weird part is that when I tried using the set title command, I would get a new title positioned at the top of the plot, over the coordinate system while the filename was still displayed lower on the picture, over parts of the plot.
  • choroba
    choroba over 11 years
    set title sets the title of the whole picture. plot ... title sets the title for that particular plot and defaults to the filename of function being plotted.