Thu 13 Oct 2016 12:57:59 PM UTC, original submission:
I do in Octave in a terminal with Sixel Graphics:
t=[0:0.1:6.28];
plot(t,sin(t))
Nothing is output.
GnuPlot is compiled with support for Sixel Graphics and works stand-alone.
./configure --with-bitmap-terminals --with-gihdir=/home/pi/gnuplot-4.6.6/docs --with-texdir=/home/pi/gnuplot-4.6.6/docs
Terminal sixel is used by having this in .bashrc:
export GNUTERM=sixel
I have a workaround to get a plot:
print -dgif "-S660,480" graph.gif;
system "img2sixel graph.gif"; # -P in GNU Screen
I use Bash on Ubuntu on Windows (BashOnWindows/WSL) and Bash on UoW in Mintty (WSLTTY) as terminal.
More info:
To show Sixel graphics get WSLTTY: https://github.com/mintty/wsltty
A program to show the plot as workaround for a bug in Octave:
~$ cat myprint.m
print -dgif "-S660,480" graph.gif;
system "img2sixel graph.gif"; #-P as switch, if in Screen.
To install in Bash on Ubuntu on Windows:
sudo do-release-upgrade
sudo nano /etc/apt/sources.list
#Copy the four lines and exchange 'deb' for 'deb-src' in the copies.
sudo apt update && sudo apt -y dist-upgrade
sudo apt -y install dpkg-dev
cd
apt source gnuplot
sudo apt -y install libgd2-dev
cd gnuplot-4.6.6
./configure --with-bitmap-terminals --with-gihdir=/home/pi/gnuplot-4.6.6/docs --with-texdir=/home/pi/gnuplot-4.6.6/docs
make
#You may skip down to WSLTTY if you use it.
export DISPLAY=:0
#Start Xming
mlterm &
xterm -ti vt340 &
#Start Bash on UoW in Mintty (WSLTTY)
#In any:
cd
./gnuplot-4.6.6/src/gnuplot
set term sixel
plot sin(x)
exit
sudo apt -y install octave octave-symbolic
sudo apt -y install libsixel-bin epstool transfig
#Stop Xming when running Bash on UoW in Mintty
#Add to .bashrc
export DISPLAY=:0
export GNUTERM=sixel
export GNUPLOT_PS_DIR=/home/pi/gnuplot-4.6.6/term/PostScript
export PATH=/home/pi/gnuplot-4.6.6/src:$PATH
#Restart Bash on UoW in Mintty.
octave
#See video and http://wiki.octave.org/Symbolic_package
https://www.youtube.com/watch?v=r3XOrW8tVSY
|