Gnuplot is a good mathematical drawing tool that can be used in Eamcs org mode, and 1 now finds newLISP has long been supported.
Let's start with an example and look at the diagram:
This figure has three polylines, each of which can represent data in three lists. Refer to the following newLISP code:
#!/usr/bin/newlisp;;( Module "PLOT.LSP") (Load "B.LSP") (Set ' Plot:title "Cluster storage Summary") (Set ' Plot:sub-title "Show storage and task volume by Month") (Set ' Plot:labels ' ("2015 /01 "" "" "" "" "" "" "" "" "" "" "" "" "" "", "" "" "" "" "" "" "" "(" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" " Display plot image (plot ' (6209.72 6425.52 7668.77 8146.90 9095.75 11572.1 12739.3) ' (12714.35 12708.40 12802.94 12802. 94 12802.94 17667.49 17667.49) ' (7878 11605 7028 7613 9721 11977 12377) ); Save 11572.1 the displayed image to a File (plot:export "Example-plot.png") (exit)
Description
1. Module PLOT.LSP is canceled because the font set in the code does not support Chinese, so after copying the PLOT.LSP code, the code that sets the font is commented, and the file name is B.LSP.
2. Labels the corresponding list represents the x-axis value
3. Legend represents the legend, noting that the number is equal to the number of polylines
4. Export will automatically save the picture to the file
5. Plot's polyline data requires only the Y value, and the X value is the value of the corresponding position in the labels.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
newLISP drawing with Gnuplot