%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/org/ |
Current File : //usr/local/share/emacs/27.2/lisp/org/org-plot.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\207" [require cl-lib org org-table] 2) #@56 Default options to gnuplot used by `org-plot/gnuplot'. (defvar org-plot/gnuplot-default-options '((:plot-type . 2d) (:with . lines) (:ind . 0)) (#$ . 495)) (defvar org-plot-timestamp-fmt nil) #@115 Parse an OPTIONS line and set values in the property list P. Returns the resulting property list. (fn P OPTIONS) (defalias 'org-plot/add-options-to-plist #[514 "\211\203i \300\301\302\303\211\203g \211@\211@\235\203C \304\305@!P#\203` \303\225\262\306A\307\310\311\f\"!@\312\fA\"B#\262\202 \304\305@!P\"\203` \306A\307\310\311\f\"!@#\262A\266\202\202 \266\207" [(("type" . :plot-type) ("script" . :script) ("line" . :line) ("set" . :set) ("title" . :title) ("ind" . :ind) ("deps" . :deps) ("with" . :with) ("file" . :file) ("labels" . :labels) ("map" . :map) ("timeind" . :timeind) ("timefmt" . :timefmt)) ("set" "line") ":\\([\"][^\"]+?[\"]\\|[(][^)]+?[)]\\|[^ \n ;,.]*\\)" 0 string-match regexp-quote plist-put read-from-string match-string 1 plist-get] 15 (#$ . 694)]) #@116 Move the point forward to the beginning of nearest table. Return value is the point at the beginning of the table. (defalias 'org-plot/goto-nearest-table #[0 "\300\301!\210\302 \204 \303\301yW\203 \304 b\207" [move-beginning-of-line 1 org-at-table-p 0 org-table-begin] 2 (#$ . 1505) nil]) #@189 Collect options from an org-plot `#+Plot:' line. Accepts an optional property list PARAMS, to which the options will be added. Returns the resulting property list. (fn &optional PARAMS) (defalias 'org-plot/collect-options #[256 "\300\301!\302\303\"\203 \304\305\306\"\"\202 \207" [thing-at-point line string-match "#\\+PLOT: +\\(.*\\)$" org-plot/add-options-to-plist match-string 1] 7 (#$ . 1803) nil]) #@76 Convert field S from timestamp to Unix time and export to gnuplot. (fn S) (defalias 'org-plot-quote-timestamp-field #[257 "\301\302!\"\207" [org-plot-timestamp-fmt format-time-string org-time-string-to-time] 5 (#$ . 2220)]) #@46 Quote field S for export to gnuplot. (fn S) (defalias 'org-plot-quote-tsv-field #[257 "\302\"\203 \207\302 \"\203 \303!\207\304\305\306\307\304\"\310#\304Q\207" [org-table-number-regexp org-ts-regexp3 string-match org-plot-quote-timestamp-field "\"" mapconcat identity split-string "\"\""] 7 (#$ . 2453)]) #@154 Export TABLE to DATA-FILE in a format readable by gnuplot. Pass PARAMS through to `orgtbl-to-generic' when exporting TABLE. (fn TABLE DATA-FILE PARAMS) (defalias 'org-plot/gnuplot-to-data #[771 "\301\302!\303\304\305\306\307!\310\"\311$\216r\211q\210\312\300!\210\313\314\"\206 \315\316\317\320\"\"c\210)r\211q\210\321\322\211\322\304%\210*\266\322\207" [org-plot-timestamp-fmt generate-new-buffer " *temp file*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 make-local-variable plist-get :timefmt "%Y-%m-%d-%H:%M:%S" orgtbl-to-generic org-combine-plists (:sep " " :fmt org-plot-quote-tsv-field) write-region nil] 11 (#$ . 2774)]) #@244 Export the data in TABLE to DATA-FILE for gnuplot. This means in a format appropriate for grid plotting by gnuplot. PARAMS specifies which columns of TABLE should be plotted as independent and dependent variables. (fn TABLE DATA-FILE PARAMS) (defalias 'org-plot/gnuplot-to-grid-data #[771 "\300\301\"S\302\303\"\203 \304\305\300\303\"\"\2024 \306@G\307\211W\203/ \211\211B\262\210\211T\262\202 \266\211\262C\307C\306\307Y\203S \304\310\311\312\313\314 \"\315\"\316\317%\"\262\242\204^ \307Y\203y \320\242\"\240\210\304\310\311\321\313\314!\322\"\323\317%\"\262\324\325!\310\307\326\313\314!\327\"\330$\216r\211q\210G @G\331\306\211\307\211W\203\367 \211\307\211W\203\333 \211 S\33288!#P\262 \33288!#P\262\210\211T\262\202\243 \266c\210\333c\210c\210\333c\210\334\262\334\262\210\211T\262\202\231 \266)r\211q\210\335\306\211\306\307%\210*\266\207" [plist-get :ind plist-member :deps mapcar #[257 "\211S\207" #1=[] 2 "\n\n(fn VAL)"] nil 0 make-byte-code 257 "\301\211\242T\240\210\301\242\3008B\207" vconcat vector #1# 4 "\n\n(fn ROW)" delq "\211G\301\211W\203! \211\211\300\242>\204 \211\233\211\302\240\266\210\211T\262\202 \266\303\302\"\207" [0 nil delq] 7 generate-new-buffer " *temp file*" "\301\300!\205 \302\300!\207" [buffer-name kill-buffer] 2 #[771 "T\262T\262\300\301\302Z\303\\&\207" [format "%f %f %f\n%f %f %f\n" 0.5 0.5] 11 "\n\n(fn COL ROW VALUE)"] string-to-number "\n" "" write-region] 28 (#$ . 3468) nil]) #@309 Write a gnuplot script to DATA-FILE respecting the options set in PARAMS. NUM-COLS controls the number of columns plotted in a 2-d plot. Optional argument PREFACE returns only option parameters in a manner suitable for prepending to a user-specified script. (fn DATA-FILE NUM-COLS PARAMS &optional PREFACE) (defalias 'org-plot/gnuplot-script #[1027 "\301\302\"\211\303=\203 \304\202 \301\305\"\301\306\"\301\307\"\301\310\"\301\311\"\301\312\"\301 \313\"\301\n\314\"\301\315\"\301\f\316\"\317 \320\"\205J \301 \320\"\301\321\"\301\322\"\301\323\"\324\325=\203e \326\202x \327=\204s \303=\203w \330\202x \331\332C\333\334\335\336\337!\340\"\341\342%\331 \203\236 \343\344\345!\"!\210\343\346\"!\210\325=\204\305 \347\267\202\305 \203\305 \350!\210\202\305 \203\302 \351\202\303 \352!\210\203\322 \343\353\"!\210\354\"\210\211\203\356 \211@\343\355\"!\210A\266\202\202\332 \210\356\242\331\357\360#)\266\203\204\361!\210\203\343\362\363\364\365#\"!\210\203%\343\366\363\367\n\365#\"!\210\203:\370!\210\371\f\2066\372\373Q!\210\204\370\374\267\202\342\375\211W\203\302\211\325=\203q\203d\211T\232\204\272\203q\211T\f\235\203\272\343\203\217\375V\203\217\204\217\343\376\"\206\220\377T\203\241\343\201@ \"\202\242\3778\206\264\343\201A T\"&B\262\210\211T\262\202I\266\202\342\343\201B #C\262\202\342\343\201C #C\262\201D \363\201E \201F !\201G #Q!\210\242\207" [inhibit-changing-match-data plist-get :plot-type grid pm3d :with :set :line :map :title :file :ind :timeind :timefmt :textind plist-member :deps :labels :xlabels :ylabels "'%s' using %s%d%s with %s title '%s'" 2d "plot" 3d "splot" nil "reset" make-byte-code 257 "\300\211\242\301Q\240\207" vconcat vector ["\n"] 5 "\n\n(fn LINE)" format "set term %s" file-name-extension "set output '%s'" #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (3d 172 grid 184)) "set map" "set pm3d map" "set pm3d" "set title '%s'" mapc "set %s" "^set datafile separator" t string-match "set datafile separator \"\\t\"" "set xtics (%s)" mapconcat #[257 "\300\301A@#\207" [format "\"%s\" %d"] 5 "\n\n(fn PAIR)"] ", " "set ytics (%s)" #[257 "\300\301A@#\207" [format "\"%s\" %d"] 5 "\n\n(fn PAIR)"] "set xdata time" "set timefmt \"" "%Y-%m-%d-%H:%M:%S" "\"" #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (2d 326 3d 455 grid 470)) 0 "%d:" "" ":xticlabel(%d)" "%d" "'%s' matrix with %s title ''" "'%s' with %s title ''" " " identity reverse ",\\\n "] 37 (#$ . 5001)]) #@188 Plot table using gnuplot. Gnuplot options can be specified with PARAMS. If not given options will be taken from the +PLOT line directly before or after the table. (fn &optional PARAMS) (defalias 'org-plot/gnuplot #[256 "\301\302!\210\303 \304\305\306\307\310!\311\"\312$\216\313 \210\314\315!\203# r\315q\210db\210)\316 \210\211\203E \211@\317@\"\204>