[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Plotting in Emacs?
From: |
Tak Kunihiro |
Subject: |
Re: Plotting in Emacs? |
Date: |
Tue, 18 Apr 2023 16:39:46 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin) |
I suggest to use org-babel with R.
1. Install R.
2. Create a file `weight.org'.
3. Paste following lines and save.
4. M-x org-babel-execute-buffer
I spent significant time on this system. On this system, debug is hard.
Thus I do not suggest to do something complicated more than weight chart
using org-babel with R.
#+tblname: orgtbl0
| rownames | col1 | col2 |
|----------+------+------|
| day 1 | 1 | 60 |
| day 2 | 2 | 59 |
| day 3 | 3 | 58 |
| day 4 | 4 | 57 |
| day 5 | 5 | 58 |
#+header: :var dframe=orgtbl0 :rownames yes :colnames yes
#+header: :file plot.png
#+begin_src R :results graphics file :exports results
xx <- dframe[,1]
yy <- dframe[,2]
plot(xx,yy)
#+end_src