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

  • Thread starter erok81
  • Start date
In summary, the conversation discussed the difficulties of using gnuplots with PuTTY for a programming assignment. The person was unable to open a second window for the plot to display and asked for help in enabling X11 forwarding in PuTTY. They were eventually able to resolve the issue with the help of an X server program called Xming.
  • #1
erok81
464
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
  • #2
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:
  • #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.
 
  • #5
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.
 
  • #6
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. :)
 

1. What is UNIX/PuTTY and how is it used?

UNIX is an operating system that is commonly used for computers and servers. PuTTY is a free and open-source terminal emulator, network file transfer application, and serial console for UNIX systems. It is used to remotely connect to a server or computer and perform various tasks, such as file transfers and running programs.

2. What are the benefits of using UNIX/PuTTY?

One of the main benefits of using UNIX/PuTTY is that it allows for remote access and control of a server or computer. This is especially useful for managing and troubleshooting systems that are located in different physical locations. Additionally, PuTTY has a user-friendly interface and supports a wide range of protocols, making it a versatile tool for remote communication.

3. What is Gnuplot and how does it work with UNIX/PuTTY?

Gnuplot is a command-line program that is used for creating graphs and plots from data. It is commonly used in scientific and engineering fields for data visualization. Gnuplot can be installed and used on UNIX systems, and can also be accessed and used through PuTTY's terminal interface.

4. Can Gnuplot be used for real-time data visualization on UNIX/PuTTY?

Yes, Gnuplot has the ability to update plots in real-time as new data is received. This is useful for monitoring and analyzing data streams, such as in scientific experiments or industrial processes. The data can be sent to the Gnuplot program through a terminal interface on UNIX/PuTTY, allowing for real-time visualization and analysis.

5. Is there a learning curve for using UNIX/PuTTY and Gnuplot?

While there may be some initial learning required to understand the commands and functions of UNIX/PuTTY and Gnuplot, both have extensive documentation and online resources available to help users get started. With some practice, users can become proficient in using these tools for data analysis and visualization.

Similar threads

Replies
42
Views
4K
Replies
18
Views
8K
  • Computing and Technology
Replies
4
Views
2K
  • Computing and Technology
Replies
5
Views
2K
  • Computing and Technology
Replies
26
Views
3K
  • Computing and Technology
Replies
10
Views
2K
Replies
21
Views
3K
Replies
19
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
Replies
17
Views
770
Back
Top