gnuplot
Штука для всяческих графиков.
- https://ru.wikipedia.org/wiki/Gnuplot — википедийное.
- https://en.wikibooks.org/wiki/Gnuplot - типа, учебничек на викибуксах
- https://orgmode.org/manual/Org-Plot.html
- https://orgmode.org/worg/org-tutorials/org-plot.html
- https://orgmode.org/worg/org-contrib/babel/examples/org-babel-gnuplot.org
- https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.html
- https://thearjunmdas.github.io/entries/plot-graphs-in-emacs-org-mode/
- https://gnuplot.sourceforge.net/documentation.html
aptitude install gnuplot
Из обнаруженного — прекрасно понимает кириллицу и вообще utf8, если она в скрипте или файле с данными. Если пытаться использовать org-plot, интерактив и, кажется, командную строку – utf8 не будет, или по крайней мере, я не поняла, что сделать, чтоб было.
Еще одно из обнаруженного: при попытках найти «как сделать, чтоб хорошо смотрелось» важно отслеживать, завершался ли процесс gnuplot. Потому что он запоминает настройки и может учитывать их при перегенерации типа с новыми.
file:///usr/share/doc/gnuplot/htmldocs/node83.html
There are four gnuplot commands which actually create a plot: plot, splot, replot, and refresh. Other commands control the layout, style, and content of the plot that will eventually be created. plot generates 2D plots. splot generates 3D plots (actually 2D projections, of course). replot reexecutes the previous plot or splot command. refresh is similar to replot but it reuses any previously stored data rather than rereading data from a file or input stream.
Each time you issue one of these four commands it will redraw the screen or generate a new page of output containing all of the currently defined axes, labels, titles, and all of the various functions or data sources listed in the original plot command. If instead you need to place several complete plots next to each other on the same page, e.g. to make a panel of sub-figures or to inset a small plot inside a larger plot, use the command set multiplot to suppress generation of a new page for each plot command.
Пример с multiplot.
set terminal svg dynamic set output "output_multiplot.svg" set key reverse Left set multiplot layout 2,1 plot sin(x) with points pt 6 title "Top plot is sin(x)" at 0.7, 0.50 plot cos(x) with points pt 7 title "Bottom plot is cos(x)" at 0.7, 0.01 unset multiplot
Для csv как для файлов данных:
set datafile separator ','
Ну, или там ";", или что актуально.
- file:///usr/share/doc/gnuplot/htmldocs/node231.html — using – что берем из файла с данными, как применяем.
SVG - file:///usr/share/doc/gnuplot/htmldocs/node619.html
set terminal svg {size <x>,<y> {|fixed|dynamic}} {mouse} {standalone | jsdir <dirname>} {name <plotname>} {font "<fontname>{,<fontsize>}"} {{no}enhanced} {fontscale <multiplier>} {rounded|butt|square} {solid|dashed} {linewidth <lw>} {background <rgb_color>}
Dynamic - позволяет смотрелкам менять размер svg-картинки.
set key bottom right
Отправит легенду в правый нижний угол. Так она обычно заводится в верхнем правом внутри.
file:///usr/share/doc/gnuplot/htmldocs/node319.html – вообще про легенду.
file:///usr/share/doc/gnuplot/htmldocs/node323.html
set key autotitle causes each plot to be identified in the key by the name of the data file or function used in the plot command. This is the default. set key noautotitle disables the automatic generation of plot titles. The command set key autotitle columnheader causes the first entry in each column of input data to be interpreted as a text string and used as a title for the corresponding plot. If the quantity being plotted is a function of data from several columns, gnuplot may be confused as to which column to draw the title from. In this case it is necessary to specify the column explicitly in the plot command, e.g.
plot "datafile" using (($2+$3)/$4) title columnhead(3) with lines
Note: The effect of set key autotitle columnheader, treatment of the first line in a data file as column headers rather than data applies even if the key is disabled by unset key. It also applies to stats and fit commands even though they generate no key. If you want the first line of data to be treated as column headers but not to use them for plot titles, use set datafile columnheaders.
In all cases an explicit title or notitle keyword in the plot command itself will override the default from set key autotitle.
- http://mydebianblog.blogspot.com/2006/08/gnuplot.html - эпической давности, но остается полезным.
- http://gnuplot.ikir.ru/ - про gnuplot же
- http://www.gnuplotting.org/
- https://stackoverflow.com/questions/tagged/gnuplot
- http://gnuplot.info
- https://raymii.org/s/tutorials/GNUplot_tips_for_nice_looking_charts_from_a_CSV_file.html
Локального:
file:///usr/share/doc/gnuplot/htmldocs/node335.html – про logscale, в смысле, делать оси логарифмическими для лучшей обозримости.
set logscale <axes> {<base>} unset logscale <axes> show logscale
- file:///usr/share/doc/gnuplot/htmldocs/node235.html - xticklabels – подписи меток на оси x.
- file:///usr/share/doc/gnuplot/htmldocs/node251.html - title – названия линий.
- When both set terminal and set output are used together, it is safest to give set terminal first