title: gnuplot with a variable in the path to a file
body: <p>I need to run gnuplot scripts on different devices.  The file structure is the same on the devices, once I get to a particular directory, but the paths to those directories are different.  I think I need to have a variable in the path name that I can change according to which device I am on.</p>
  
  <p>I thought the following would work, <a href="https://stackoverflow.com/questions/14911128/using-relative-paths-in-gnuplot-plot-files">because I found something similar here</a>, but it doesn't:</p>
  
  <pre><code>path_to_directory="/desktop/path/to/directory"
  # path_to_directory="laptop/path/to/directory"
  # the line above is commented out but it can be included 
  # if I want to switch from my desktop to my laptop
  path_to_file="$path_to_directory/path/to/file"
  plot path_to_file ...
  </code></pre>
  
  <p>A warning message says: Skipping unreadable file "$path_to_directory/path/to/file"</p>
  
  <p>Do you know how I can include a variable in the path of a gnuplot script, so that I can switch easily between paths?</p>
  
  <p>Thank you.</p>