Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #3809

Re: How can I view candlestick charts over SSH ?

From (Héctor A. Abreu) <invalid@invalid.com>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: How can I view candlestick charts over SSH ?
Date 2017-11-05 13:16 +0000
Organization A noiseless patient Spider
Message-ID <otn2vv$p97$1@dont-email.me> (permalink)
References <slrnoujsu4.edv.invalid@habreu2017081501.consoloconsola.ddns.net>

Show all headers | View raw


On 2017-10-20, (Héctor A. Abreu) <invalid@invalid.com> <> wrote:
> Hi,
>
> I need to view some candlestick charts over SSH, so I installed
> gnuplot-nox on my Linux server distro (Devuan) and modified the example
> shown at:
>
> http://timmurphy.org/2013/03/10/creating-candlestick-charts-with-gnuplot
>
> So my candlestick.gnuplot looks like this:
>
> set terminal dumb
> set xdata time
> set timefmt"%Y-%m-%d"
> set xrange ["2013-02-14":"2013-02-27"]
> set yrange [*:*]
> set datafile separator ","
> plot 'bhp.dat' using 1:2:4:3:5 notitle with candlesticks
>
> Even though I know this ASCII view won't look "pretty", I thought that
> at least it would be readable, but the chart is displayed with star (*)
> characters, which makes it impossible to read.
>
> Is there any workaround to make a candlestick chart viewable and
> readable over SSH ? Perhaps by changing the star (*) character to a
> different one in order to do the plotting? If the latter is possible,
> how can I change the plotting character? Or do I need to change the
> terminal type to something other than dumb?
>
> Sorry if this is a silly question, I am new to gnuplot and I haven't
> found an answer in the manuals or the web.
>
> Thank you in advance for any hint or help, even if the recommendation is
> to look at another application, I hope not. I like what I have read
> about Gnuplot.
>
> Regards,

I did my research, so I'm sharing what I found to make it work on a
remote terminal (ASCII, via SSH) and in a local terminal (real graph, no
ASCII, displayed inside a terminal, using Gnuplot with Sixel graphics
support).

I. On remote terminal (ASCII, via SSH)

1) On a Debian (Devuan) remote server, instead of installing gnuplot-nox
I installed gnuplot5-nox.

2) The ASCII view can be improved by changing the "size" of the output.
For example, I changed the line "set terminal dumb" to:

set terminal dumb size 150,85

And you can play around with the values. In case the graph won't fit in
your screen, you can still scroll up and down if you pipe the output to
be viewed with the "less" command:

gnuplot candlestick.gnuplot | less

II. On a local terminal (real graph, no ASCII, displayed inside a
terminal). IMPORTANT: the line with "set terminal" will need to look
like this:

set terminal sixelgd

1) Inside a terminal emulator in Xorg:

1.1) You will need Gnuplot version 5 or higher.

1.2) You will need a terminal emulator that supports Sixel graphics. For
example, mlterm can do it out of the box. Xterm can do it if compiled
with "--enable-sixel-graphics". More options can be found at the
libsixel site (see 1.3). 

1.3) You will need libsixel. You can get it from:

https://github.com/saitoha/libsixel

I had to get gd first:

sudo aptitude install libgd-dev

And then I compiled libsixel like this:

./configure --with-gd --enable-tests
make
make check
sudo make install

2) With no Xorg, inside the Framebuffer:

2.1) You will need access to the framebuffer (/dev/fb0, /dev/fb1, etc.).
I didn't need to do anything special to have access to that, my Linux
box already had it by default, but I know that some systems need to
create /dev/fb0 and things like that.

2.2) You will need a Framebuffer terminal, like Yaft: 

github.com/uobikiemukot/yaft

Once you install it, just get into your TTY (no X) and type:

yaft

To quit, just type "exit".

I hope it helps someone with the same problem I had.

-- 
Héctor Abreu

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

How can I view candlestick charts over SSH ? (Héctor A. Abreu) <invalid@invalid.com> - 2017-10-20 13:01 +0000
  Re: How can I view candlestick charts over SSH ? (Héctor A. Abreu) <invalid@invalid.com> - 2017-11-05 13:16 +0000
    Re: How can I view candlestick charts over SSH ? Gavin Buxton <gavinbuxton@gmail.com> - 2017-11-05 06:57 -0800
    Re: How can I view candlestick charts over SSH ? Ethan A Merritt <EAMerritt@gmail.com> - 2017-11-06 21:03 -0800

csiph-web