03 March 2013

353. Cygwin with octave and gnuplot on windows XP.

Here's my fourth Windows XP post.

Again, the goal is primarily to get Gnuplot and Octave working on Windows, together with sed, gawk and other tools for data processing. In this post that's done using cygwin on windows XP.

This is (in my opinion) a better alternative to installing the native gnuplot and octave packages (posts 350, 351, 352), especially as Octave in post 350 takes well over a minute to start, but only a few seconds through cygwin.

1. Download http://cygwin.com/setup.exe and run it. Set it to install from the internet, with c:\cygwin as the root directory. Pick a mirror which is reasonably close (e.g. mirror.aarnet.edu.au in Australia).

2. You're now asked to select packages.
Select octave (search for octave, click on 'skip' to change it to the version number), octave-forgegnuplot, xinit and xorg-server

3. Cygwin will calculate dependencies. cat, gawk, sed etc. are part of the base package and don't need to be explicitly selected.

I got a single error during installation, but it doesn't seem to have caused any obvious issues:
Package: libpango1.0_0 pango1.0.sh exit code 1
4. Launch Programs/Cygwin-X/XWin server.
Unblock if necessary.

Do
echo $DISPLAY
:0
to make sure that all is well. Run gnuplot and do e.g. 'plot x w lines' to make sure that all is working. Best thing? Octave only takes a few seconds to start... You may have to load packages in octave manually (e.g. 'pkg load all')



Links to this post:
http://blog.csdn.net/lllcfr1/article/details/8657143

352. Installing coreutils and sed, gawk on Windows (without cygwin)

My third Windows XP post. Only a few more to go...

You can also set up all these tools via cygwin: http://verahill.blogspot.com.au/2013/03/353-cygwin-with-octave-and-gnuplot-on.html

1. coreutils
coreutils covers a fair number of the basic linux file tools. In particular cat, paste and join are of interest with respect to data processing.

A. Go to http://sourceforge.net/projects/gnuwin32/files/coreutils/5.3.0/coreutils-5.3.0.exe/download?use_mirror=waix&download= and download coreutils-5.3.0.exe. Run the file.

B. Make sure to add C:\Program Files\GnuWin32\bin to the PATH:
* Right-click on my computer, select properties, Advanced.
* Click on Environment variables
* In the second box, 'system variables', highlight 'Path' and click on 'Edit'. In the variable value box, add ';C:\Program Files\GnuWin32\bin'

C. Go to the start meny, click on Run..., and type in 'cmd'
In the (fake) DOS window, type e.g. ls -lah to see if everything works.

2. gawk
Go to http://gnuwin32.sourceforge.net/packages/gawk.htm and open http://downloads.sourceforge.net/project/gnuwin32/gawk/3.1.6-1/gawk-3.1.6-1-setup.exe

Run the .exe and use the default installation location (which is the same as the coreutils above -- so you don't have to add a separate path). Run cmd and do e.g.

cat ntuser.ini|gawk "{print $2}"
S e t t i n g s ; T e m p o r a r y
3. sed
Sed is installed like gawk -- go to http://gnuwin32.sourceforge.net/packages/sed.htm and go to http://gnuwin32.sourceforge.net/downlinks/sed.php

Run the .exe file and install in the default location. Try e.g.

cat ntuser.ini|sed "s/e/E/g"

351. Installing gnuplot on Windows XP

Here's my second Win XP post.

Here's how to set up gnuplot on windows XP. You can also set it up using cygwin: http://verahill.blogspot.com.au/2013/03/353-cygwin-with-octave-and-gnuplot-on.html

1. Download
Go to http://www.tatsuromatsuoka.com/gnuplot/Eng/winbin/ and download http://www.tatsuromatsuoka.com/gnuplot/Eng/winbin/gp470-20120916-win32-mingw-setup.zip

You'll need e.g. 7zip to extract the file.

2. Install and set up
Extract the  gp470-20120916-mingw.exe file to some temporary place, and then launch the installation by double-clicking on it. Most installation steps are straight-forward. Set windows as the default terminal, and make sure to check the box to add the application directory to PATH.

3. Usage
Launch gnuplot from the windows start menu as any other program if you want it to run interactively.

Alternatively, create a script and launch it using "gnuplot scriptname" from cmd as you would under linux.