This section will be an introduction how to install the program on different system. Please feel free to add informations here.
As the program is written in python it can, in priciple, work under Linux, Windows and Mac OS-X. Unfortunately it became harder over the years to install the required libraries for Windows and OS-X so I have decided to drop the native support for these platforms. I provide a VirtualBox image with Linux and plot.py for these cases.
Requirements
If you don't install the Windows binaries, some software requirements have to be fullfilled to use the Program, these are:
In Linux it should be easy to install all these components via your repository system. Windows users will have to download and install all the Packages themselves, see the instructions below.
Since version 0.7 I have created a Debian repository for the program which can be used to install plot-script. Just add the line to your /etc/apt/sources.list or to a new .list file in the /etc/apt/sources.list.d directory:
deb http://plotpy.sourceforge.net/repository py27 main
And add the repository key which can be found at http://plotpy.sourceforge.net/repository/glavic_key.asc
To install use your package manager (e.g. apt, muon) and install the plot-script package. Here is an example script:
echo "# Repository for the python program plot-script by Artur Glavic" > /tmp/plot.list
echo "deb http://plotpy.sourceforge.net/repository py27 main" >> /tmp/plot.list
sudo cp /tmp/plot.list /etc/apt/sources.list.d
wget http://plotpy.sourceforge.net/glavic_key.asc -O /tmp/glavic_key.asc
sudo apt-key add /tmp/glavic_key.asc
sudo apt-get update
sudo apt-get install plot-script
The package should work for all distributions using python 2.7 (Natty (11.04)> Cosmic (18.10), while I would recommand 18.04 LTS).
The installation procedure depends on your privileges, but the first steps are the same:
Download the latest version from the Download Area Extract the .tar.gz file to a directory of your choice
tar -xvvzf Plot-script-(Version).tar.gz
Enter the directory
cd Plot-script-(Version)
Start the python installation script
python setup.py install
or
Start the installtion script
./install
Find a directory in path, that you are allowed writing to
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/your-user/bin
Start the python installtion script
python setup.py install --prefix /home/your-user --install-scripts /home/your-user/bin
or
Start the installation script (linking) to this directory
./install /home/your-user/bin
Adding Commandline Completion
You can add commandline completion for the Linux console by adding the following lines to your ~/.bashrc:
_plot_complete() {
local curw
COMPREPLY=()
curw="${COMP_WORDS[COMP_CWORD]}"
if [ $COMP_CWORD == 1 ]
then COMPREPLY=($(compgen -W "squid 4circle dns treff refl in12 kws2 gisas" -- $curw))
else case "${COMP_WORDS[1]}" in
"dns") COMPREPLY=($(compgen -G "$curw.d_dat" -- $curw) $(compgen -G "$curw.d_dat.gz" -- $curw));;
"4circle") COMPREPLY=($(compgen -G "$curw.spec" -- $curw) $(compgen -G "$curw.spec.gz" -- $curw) $(compgen -G "$curw.fio" -- $curw) $(compgen -G "$curw.fio.gz" -- $curw));;
"squid") COMPREPLY=($(compgen -G "$curw.dat" -- $curw) $(compgen -G "$curw.dat.gz" -- $curw));;
"kws2") COMPREPLY=($(compgen -G "$curw.DAT" -- $curw) $(compgen -G "$curw.gz" -- $curw));;
"gisas") COMPREPLY=($(compgen -G "$curw.edf" -- $curw) $(compgen -G "$curw.cmb" -- $curw) $(compgen -G "$curw.gz" -- $curw));;
"in12") COMPREPLY=($(compgen -o default -- $curw));;
"treff") COMPREPLY=($(compgen -o default -- $curw));;
"refl") COMPREPLY=($(compgen -G "$curw.UXD" -- $curw) $(compgen -G "$curw*.gz" -- $curw));;
esac
fi
return 0
}
complete -F _plot_complete -o dirnames plot.py
You should now be able to run the virtual Linux system with plot.py installed.
As I do not create a new image for every update and to keep the Linux system up to date, you should run the following commands in a terminal inside the VM:
$ sudo apt update
$ sudo apt upgrade
The user and password of the VM are both "plotpy".
If you want to work with data on you computers normal harddrive you have to mount it to the virtual machine, first. This can be done as follows:
Menu Devices->Shared Folders->Shared folder settings...
Click the Add button on the right
Select which folder/drie to map to the virtual machine
Select "Auto-mount" and "Make Permanent"
When opening the "File System" link from the VM Desktop you should now see yor mounted device in the list on the right as "sf_{your mount point}".