Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

UNIX/PuTTY and Gnuplots

  1. Sep 9, 2011 #1
    I'm not quite sure where this thread should go. Feel free to move if needed.

    I am taking a programming class and most of the homework I can do at home using PuTTY. However, the latest assignment uses gnuplots...which I cannot get to work with PuTTY. I am assuming it doesn't work because I can't open a second window for the plot to display. This also happens when I try to use emacs and & - it doesn't work.

    As I don't have time to sit in the computer lab at school, I'd rather do the homework at home. So far only gnuplots have caused me issues working from home.

    Any idea how to get something like gnuplots to work with a program like PuTTY?
  2. jcsd
  3. Sep 9, 2011 #2
    If it helps here is the output when I try to plot a file.
    Last edited by a moderator: May 5, 2017
  4. Sep 9, 2011 #3


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

  5. Sep 9, 2011 #4
    How does one enable X11 forwarding?

    I don't have an xserver. I did try something from my school website, but I don't think it did much.

    Other than that I only have PuTTY out of the box with no mods or customizations.
  6. Sep 10, 2011 #5


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    In PuTTY, go to Connection-SSH-X11 to enable X11 forwarding.
    Make sure you go back to Session to Save this setting.

    You'll need to have an X server running before you login through PuTTY.
    Xming might be the easiest solution for you.
  7. Sep 10, 2011 #6

    It works...at least for now. I got it to plot sin(x) and a secondary window popped up with a plot!

    Thank you for help! I would have had to skip this assignment without your help. Much appreciated.

    I should have just started digging around since it mentioned something about x11. I think because my school site said PuTTY won't work with gnuplot so I figured to get it work would have been harder.

    Anyway, thanks again for the help. :)
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook