From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tobias Frischholz Subject: gnuplot: plotting students' progress of grades Date: Tue, 1 Sep 2015 00:42:13 +0200 Message-ID: <74BD0B79-38C1-4C2A-A2C2-82E52A4826B9@friolz.com> Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_858725C1-2324-4272-9CAC-E550A1F4CEE5"; protocol="application/pgp-signature"; micalg=pgp-sha512 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWXmQ-0004Vg-FC for emacs-orgmode@gnu.org; Mon, 31 Aug 2015 18:42:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWXmM-0005t9-Ef for emacs-orgmode@gnu.org; Mon, 31 Aug 2015 18:42:22 -0400 Received: from sculptor.uberspace.de ([95.143.172.183]:52308) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWXmM-0005ss-4v for emacs-orgmode@gnu.org; Mon, 31 Aug 2015 18:42:18 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode Mailing List --Apple-Mail=_858725C1-2324-4272-9CAC-E550A1F4CEE5 Content-Type: multipart/alternative; boundary="Apple-Mail=_F35070E5-6961-4751-989B-67C48DCEB32B" --Apple-Mail=_F35070E5-6961-4751-989B-67C48DCEB32B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi List, I have a table in org which looks like this (student=E2=80=99s grades): = |---+------------+--------+--------+--------+--------+--------+--------+--= ------+--------+--------+--------+--------+--------+---------| | | Sch=C3=BCler | 1-fach | 1-fach | 1-fach | 1-fach | 2-fach | = 2-fach | 2-fach | 2-fach | 4-fach | 4-fach | 4-fach | 4-fach | Endnote | = |---+------------+--------+--------+--------+--------+--------+--------+--= ------+--------+--------+--------+--------+--------+---------| | # | Wurm, Hans | 4 | 3 | 2 | 3 | 3 | | = 3 | 1 | 3 | | 3 | 5 | 3.18 | | # | Igel, Sepp | 1 | 2 | 3 | 3 | | | = | 3 | 2 | | 3 | 6 | 3.28 | = |---+------------+--------+--------+--------+--------+--------+--------+--= ------+--------+--------+--------+--------+--------+---------| | # | \o | 2.50 | 2.50 | 2.50 | 3.00 | 3.00 | 0.00 | = 3.00 | 2.00 | 2.50 | 0.00 | 3.00 | 5.50 | 3.23 | = |---+------------+--------+--------+--------+--------+--------+--------+--= ------+--------+--------+--------+--------+--------+=E2=80=94=E2=80=94=E2=80= =94=E2=80=94| I would like to use gnuplot to show me a line graph of each student=E2=80=99= s single grades in order to resemble their progress during the school = year. Can this be achieved with it? Best regards, Tobias Frischholz PGP PUBLIC KEY: http://pgp.mit.edu/pks/lookup?search=3D0xCD463AC1&op=3Dind= ex --Apple-Mail=_F35070E5-6961-4751-989B-67C48DCEB32B Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Hi List,

I have a table in org which looks like = this (student=E2=80=99s grades):

|---+------------+--------+--------+--------+--------+--------+= --------+--------+--------+--------+--------+--------+--------+---------|<= /div>
|   | Sch=C3=BCler    | 1-fach | = 1-fach | 1-fach | 1-fach | 2-fach | 2-fach | 2-fach | 2-fach | 4-fach | = 4-fach | 4-fach | 4-fach | Endnote |
|---+------------+--------+--------+--------+--------+--------+= --------+--------+--------+--------+--------+--------+--------+---------|<= /div>
| # | Wurm, Hans |      4 |   =    3 |      2 |      3 |   =    3 |        |      3 | =      1 |      3 |       =  |      3 |      5 |   =  3.18 |
| # | Igel, Sepp |     =  1 |      2 |      3 |     =  3 |        |        | =        |      3 |     =  2 |        |      3 |   =    6 |    3.28 |
|---+------------+--------+--------+--------+--------+--------+= --------+--------+--------+--------+--------+--------+--------+---------|<= /div>
| # | \o         |   2.50 = |   2.50 |   2.50 |   3.00 |   3.00 |   0.00 | =   3.00 |   2.00 |   2.50 |   0.00 |   3.00 | =   5.50 |    3.23 |
|---+------------+--------+--------+--------+--------+--------+= --------+--------+--------+--------+--------+--------+--------+=E2=80=94=E2= =80=94=E2=80=94=E2=80=94|

I would like to use gnuplot to show me a line graph of each = student=E2=80=99s single grades in order to resemble their progress = during the school year.
Can this be achieved with = it?

Best regards,
Tobias = Frischholz


= --Apple-Mail=_F35070E5-6961-4751-989B-67C48DCEB32B-- --Apple-Mail=_858725C1-2324-4272-9CAC-E550A1F4CEE5 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJV5NhFAAoJEOMnxKXNRjrBRwQP/RiMmjpMOU/ggGv60hDDm5RR zD2JkARRI+P+xJyATIk+CzGw94qIzuxMOgSLkLOR1gSqEUE2pr2W7St1AB5i/iRg /4ll/EFUPrTYpcQYAH/m3IADEkHsISzklyOITgg1+JNrqB+dpAGITF7aK9+HClIe Zuk23fx6f4B7nnWu5vDizmmSjlj0hE8UuCfAyfKPihnX7XlimPY6bJH2cutrGyhu Je6OMqdZVpno0IcDzwo4FusSbXBJQm/dWlZRQhz3q3E4IWV75hduhppkkAEN3ach WR+Uf12bVFBbhRNQkAup4mVL9Sl2ZsgyMjVwZxgDtkS4mxTqwzerZM/GpE97fhED WbAB0IsnNfhE4wJ1GFPPHdPGpSRc1PYutXrs7rQDexQj0DHadVs1/oWNYjqfMzJW tjkjGkirP7s2R3a0/QrKMTqfloPvzt4AS5V1uHnjYu+Q7TYJRgZJ6WhZ2zHLCJ2m e6iMk6ukoYcQzaBo1QGle305j0OKd3v5XovNpwIHiZeBMkp2xKl2+cRMlUJoLcb9 ozdto3OYdJXSq/92scn05UPDwC8rMbhidHoAmsmbpM9jMwQraCqVqdQ8emYLBkCl 0nTC49Gm8UmYx9qDY2W54CXMNj/CrcvyPShZ710a+w+BUFjVAGaqKUtQFBRvYeal ammsL4mGcpgEohdJ8lN1 =1T9u -----END PGP SIGNATURE----- --Apple-Mail=_858725C1-2324-4272-9CAC-E550A1F4CEE5-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Klein Subject: Re: gnuplot: plotting students' progress of grades Date: Tue, 1 Sep 2015 08:38:19 +0200 Message-ID: <20150901083819.31db99e3@pckr150.mpip-mainz.mpg.de> References: <74BD0B79-38C1-4C2A-A2C2-82E52A4826B9@friolz.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWfD9-0003vh-Ev for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 02:38:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWfD5-0003td-EH for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 02:38:27 -0400 Received: from gate1.mpip-mainz.mpg.de ([194.95.63.248]:37960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWfD5-0003tZ-73 for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 02:38:23 -0400 In-Reply-To: <74BD0B79-38C1-4C2A-A2C2-82E52A4826B9@friolz.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Tobias Frischholz Cc: Org Mode Mailing List Hi, Tobias Frischholz wrote: > Hi List, >=20 > I have a table in org which looks like this (student=E2=80=99s grades): >=20 [s.d.] > I would like to use gnuplot to show me a line graph of each student=E2=80= =99s > single grades in order to resemble their progress during the school > year. Can this be achieved with it? >=20 You can use something like this: #+Name: grades |---+------------+--------+--------+--------+------| | | Sch=C3=BCler | 1-fach | 1-fach | 1-fach | note | |---+------------+--------+--------+--------+------| | # | Wurm, Hans | 4 | 3 | 2 | 3.18 | | # | Igel, Sepp | 1 | 2 | 3 | 3.28 | |---+------------+--------+--------+--------+------| | # | \o | 2.50 | 2.50 | 2.50 | 3.23 | |---+------------+--------+--------+--------+------| #+begin_src gnuplot :var data=3Dgrades :file noten.png put your gnuplot code here #+end_src Please see the worg page http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.html for more information. Best regards Robert > Best regards, > Tobias Frischholz >=20 > PGP PUBLIC KEY: > http://pgp.mit.edu/pks/lookup?search=3D0xCD463AC1&op=3Dindex >=20 From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Loris Bennett" Subject: Re: gnuplot: plotting students' progress of grades Date: Tue, 01 Sep 2015 08:59:17 +0200 Message-ID: <87wpwabp6i.fsf@hornfels.zedat.fu-berlin.de> References: <74BD0B79-38C1-4C2A-A2C2-82E52A4826B9@friolz.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWfXU-0008NC-0R for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 02:59:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWfXQ-0004d0-Q1 for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 02:59:27 -0400 Received: from plane.gmane.org ([80.91.229.3]:33661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWfXQ-0004cp-IP for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 02:59:24 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZWfXO-00041G-S0 for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 08:59:22 +0200 Received: from hornfels.zedat.fu-berlin.de ([160.45.11.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Sep 2015 08:59:22 +0200 Received: from loris.bennett by hornfels.zedat.fu-berlin.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Sep 2015 08:59:22 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Tobias, Tobias Frischholz writes: > Hi List, > > I have a table in org which looks like this (student’s grades): > > |---+------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+---------| > | | Schüler | 1-fach | 1-fach | 1-fach | 1-fach | 2-fach | 2-fach | 2-fach | > 2-fach | 4-fach | 4-fach | 4-fach | 4-fach | Endnote | > |---+------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+---------| > | # | Wurm, Hans | 4 | 3 | 2 | 3 | 3 | | 3 | 1 | 3 | | 3 | 5 | 3.18 | > | # | Igel, Sepp | 1 | 2 | 3 | 3 | | | | 3 | 2 | | 3 | 6 | 3.28 | > |---+------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+---------| > | # | \o | 2.50 | 2.50 | 2.50 | 3.00 | 3.00 | 0.00 | 3.00 | 2.00 | 2.50 | 0.00 | > 3.00 | 5.50 | 3.23 | > |---+------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+————| > > I would like to use gnuplot to show me a line graph of each student’s single > grades in order to resemble their progress during the school year. > Can this be achieved with it? > > Best regards, > Tobias Frischholz > > PGP PUBLIC KEY: http://pgp.mit.edu/pks/lookup?search=0xCD463AC1&op=index I haven't used gnuplot for a couple of decades and in recent years have used R with org for this sort of thing, but I'm sure it's possible Have you looked at http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.html ? Cheers, Loris -- This signature is currently under construction. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: gnuplot: plotting students' progress of grades Date: Tue, 1 Sep 2015 11:51:02 +0100 Message-ID: <87d1y2ifah.fsf@ucl.ac.uk> References: <74BD0B79-38C1-4C2A-A2C2-82E52A4826B9@friolz.com> <20150901083819.31db99e3@pckr150.mpip-mainz.mpg.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWj9j-0003mX-Ku for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 06:51:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWj9g-0005VA-AT for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 06:51:11 -0400 Received: from mail-db3on0129.outbound.protection.outlook.com ([157.55.234.129]:61856 helo=emea01-db3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWj9g-0005V6-2F for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 06:51:08 -0400 In-Reply-To: <20150901083819.31db99e3@pckr150.mpip-mainz.mpg.de> (Robert Klein's message of "Tue, 1 Sep 2015 08:38:19 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Robert Klein Cc: Org Mode Mailing List , Tobias Frischholz On Tuesday, 1 Sep 2015 at 08:38, Robert Klein wrote: [...] > You can use something like this: [...] > #+begin_src gnuplot :var data=grades :file noten.png > put your gnuplot code here > #+end_src The problem for the OP will be that the data are in rows instead of columns and gnuplot will only plot columns (selected using "using"). The table needs to be transposed first (which is possible but don't ask me how ;-). -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-176-g45abec From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: gnuplot: plotting students' progress of grades Date: Tue, 01 Sep 2015 08:35:19 -0400 Message-ID: References: <74BD0B79-38C1-4C2A-A2C2-82E52A4826B9@friolz.com> <20150901083819.31db99e3@pckr150.mpip-mainz.mpg.de> <87d1y2ifah.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWkmd-00079k-Hf for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 08:35:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWkma-0006Jw-80 for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 08:35:27 -0400 Received: from mail-qg0-x235.google.com ([2607:f8b0:400d:c04::235]:36161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWkma-0006Jo-0q for emacs-orgmode@gnu.org; Tue, 01 Sep 2015 08:35:24 -0400 Received: by qgeb6 with SMTP id b6so91941857qge.3 for ; Tue, 01 Sep 2015 05:35:22 -0700 (PDT) In-reply-to: <87d1y2ifah.fsf@ucl.ac.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric S Fraga Cc: Org Mode Mailing List , Robert Klein , Tobias Frischholz You can transpose the table like this: (org-table-transpose-table-at-point) Alternatively (adapted from that code): this might get you where you need to be: #+name: my-data | 1 | 2 | 3 | 4 | | a | b | c | d | #+BEGIN_SRC emacs-lisp (defun get-transposed-table (tblname) (save-excursion (org-open-link-from-string (format "[[%s]]" tblname)) (while (not (org-table-p)) (forward-line)) (let* ((table (delete 'hline (org-table-to-lisp))) (contents (mapcar (lambda (p) (let ((tp table)) (mapcar (lambda (rown) (prog1 (pop (car tp)) (setq tp (cdr tp)))) table))) (car table)))) (mapconcat (lambda(x) (concat "| " (mapconcat 'identity x " | " ) " |\n" )) contents "")))) #+END_SRC #+RESULTS: : get-transposed-table #+BEGIN_SRC python :var data=(get-transposed-table "my-data") print data #+END_SRC #+RESULTS: : | 1 | a | : | 2 | b | : | 3 | c | : | 4 | d | : Eric S Fraga writes: > On Tuesday, 1 Sep 2015 at 08:38, Robert Klein wrote: > > [...] > >> You can use something like this: > > [...] > >> #+begin_src gnuplot :var data=grades :file noten.png >> put your gnuplot code here >> #+end_src > > The problem for the OP will be that the data are in rows instead of > columns and gnuplot will only plot columns (selected using > "using"). The table needs to be transposed first (which is possible but > don't ask me how ;-). -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu