Part Five - Installing gnuplot
This has not received proper testing yet...
- Close Cygwin if it is running.
- Run Cygwin Setup.
- Click on "Next" until you reach the "Select Packages" screen.
- Find the "Math" (which is American for Maths) entry (about halfway down the list).
- Click on the plus sybol, and some sub entries should appear.
- Find the "gnuplot" entry and click on the text "Default" which should change to say "install"
- Click on the next button, and let Cygwin download and install gnuplot.
- To check the installation of gnuplot worked, run your "Start X Windows" shortcut (created in Part 4)
- At the prompt, type gnuplot and press enter.
- You should see something like this:
- At the gnuplot prompt, try typing plot sin(x) and press enter.
- You should get a graph of the function appearing in a new window, like this:
- Try resizing the graph window, and maximising it. Notice it will automatically resize.
- Try zooming in by using the right mouse button.
- Try typing splot x*x-y*y and press enter. The command splot (special plot?) is used for 3D graphs, in this case f(x,y) = x^2 - y^2.
- You should get a graph like this:
- Again try resizing the graph window.
- Try rotating the figure using the left mouse button (left click and move the mouse left and right).
- Try adjusting the viewpoint using the left mouse button (left click and move the mouse up and down).
- Try adjusting the vertical scale using the middle mouse button (middle click and move the mouse up and down).
- Try zooming by using the middle mouse button (middle click and move the mouse left and right).
- Close the graph windows
- Type "exit" at the gnuplot prompt to exit the gnuplot program.
- Close Cygwin
For more help using gnuplot interactively like this, I suggest you turn to Google.
There is also more documentation at the official home page, www.gnuplot.info.
P.S. - Using the Windows Command Prompt
As long as the X Windows server is running (its started when you run the "Start X Windows" shortcut) you can run gnuplot from the Windows Command Prompt (instead the Cygwin prompt). You can tell if the X Windows server is running by looking for its icon in the Windows System Tray (bottom right of screen):
Example of gnuplot being used from the windows command prompt: