How can I use gnuplots with PuTTY for my programming class assignments?

  • Thread starter Thread starter erok81
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around using gnuplot with PuTTY for programming class assignments, specifically addressing issues related to plotting and display when working remotely. Participants explore technical solutions and configurations necessary for successful implementation.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Homework-related

Main Points Raised

  • One participant expresses difficulty in using gnuplot with PuTTY, noting that it seems to be related to the inability to open a second window for plots.
  • Another participant provides output from gnuplot, indicating an error related to the display not being open, specifically mentioning "gnuplot: unable to open display ''".
  • A suggestion is made to check if an X server is running on the user's computer, with links to potential solutions like Xming.
  • Participants discuss enabling X11 forwarding in PuTTY as a necessary step for gnuplot to function properly.
  • Instructions are provided on how to enable X11 forwarding in PuTTY, emphasizing the need to have an X server running before logging in.
  • A later reply confirms that the suggested solutions worked, allowing the user to successfully plot a function, expressing gratitude for the assistance received.

Areas of Agreement / Disagreement

Participants generally agree on the need for an X server and enabling X11 forwarding in PuTTY to use gnuplot effectively. However, there is no consensus on the specific configurations or tools that may work best, as some participants mention different X server options.

Contextual Notes

Limitations include the user's lack of prior experience with X servers and potential variations in setup that may affect the success of the proposed solutions.

Who May Find This Useful

Students or individuals attempting to use gnuplot with remote access tools like PuTTY, particularly in educational settings or programming courses.

erok81
Messages
454
Reaction score
0
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?
 
Computer science news on Phys.org
If it helps here is the output when I try to plot a file.
G N U P L O T
Version 4.2 patchlevel 3.1
last modified Aug 2008
System: SunOS 5.10

Copyright (C) 1986 - 1993, 1998, 2004, 2007, 2008
Thomas Williams, Colin Kelley and many others

Type `help` to access the on-line reference manual.
The gnuplot FAQ is available from http://www.gnuplot.info/faq/

Send bug reports and suggestions to <http://sourceforge.net/projects/gnuplot>


Terminal type set to 'x11'
gnuplot> plot 'file.dat'

gnuplot: unable to open display ''
gnuplot: X11 aborted.
 
Last edited by a moderator:
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.
 
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.
 
Ha!

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. :)
 

Similar threads

Replies
18
Views
9K
Replies
42
Views
5K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 26 ·
Replies
26
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
5K
Replies
18
Views
10K
  • · Replies 6 ·
Replies
6
Views
7K