LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   GNUPLOT and graphics algoritms (need help) (https://www.linuxquestions.org/questions/linux-software-2/gnuplot-and-graphics-algoritms-need-help-618637/)

~Linux_user~ 02-04-2008 02:08 PM

GNUPLOT and graphics algoritms (need help)
 
gnuplot is a very powerfull program for drawing graphs. A have two questions about it:
1) What algoritm it use for scaling graph and diagrams? I can change window size and graphics of functions looks very pretty in all cases!
Now I write my own program where graph should display some values changing in time. But I can't implement good algoritm for scaling( problem rize when amount of points to display = 3/2, 4/3 display area). Any suggestions are wellcome.
2) gnuplot requires graphics terminal, but if I want to run it on sistem without X11(e.g. very old PC with nano-X) what should I do?
Many thanks!

maroonbaboon 02-04-2008 08:41 PM

If you enlarge the graph a lot you start to see it is made up of straight lines and corners, so it is maybe not so smart. When the window is resized I would guess it just redraws the whole graph, so the lines themselves do not become thicker or thinner.

If you write your own program you probably need to redraw the whole graph any time you make a change. Sometimes you can get better results with 'double-buffering' - draw the new image onto a hidden graphics area, then swap it into view in one go.

No X11? No problem for gnuplot. Just do 'set terminal dumb' and you get a nice ASCII plot. Or just 'set terminal' will give a couple of dozen output options including many high quality hardcopy ones to send to a printer.

Or you can print to some image format like jpg, which nano-X might be able to display.


All times are GMT -5. The time now is 03:16 AM.