emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: johanna.may@th-koeln.de
To: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: change font-size in python plots depending on context
Date: Tue, 20 Aug 2019 11:25:26 +0200	[thread overview]
Message-ID: <87blwk5gue.fsf@th-koeln.de> (raw)
In-Reply-To: <87mug5yu8m.fsf@tsdye.online>


Hi there,

thanks to Thomas and Eric.
I actually found a rather stupid mistake: I was already using a var (for
the png filename generation) and the header did not read the next
:var. So I added ,fs=fontsize to the first :var and now it works.

I will have a look Eric's function of how to get the value of
e.g. fontsize and so on (btw, I also need textwidth and textheight from
somewhere). I also found a python pgf package but I couldn't figure out
fast how to implement that (it sounds as if instead of png a pgf is
generated and then everything has the right latex layout, so pretty
cool, but it seemed not so easy to implement).

So long, cheers!

J

Thomas S. Dye writes:

> Aloha Johanna May,
>
> This works:
>
> #+name: fs
> #+BEGIN_SRC emacs-lisp
> 10
> #+END_SRC
>
> #+RESULTS: fs
> : 10
>
> #+header: :var fontsize=fs() :results output
> #+begin_src python
> print(fontsize)
> #+end_src
>
> #+RESULTS:
> : 10
>
> Note "fs()" instead of "fs".
>
> All the best,
> Tom


-- 
Prof. Dr. Johanna May
Stellvertretende Institutsleiterin CIRE
Fakultät für Informations-, Medien- und Elektrotechnik (F07)
Institut für Elektrische Energietechnik (IET)
Cologne Institute for Renewable Energy (CIRE)
Lehrgebiete: Energieeffizienz und Grundlagen Elektrotechnik

T: +49 221-8275-2697
M: +49 174 891 9002
E: johanna.may@th-koeln.de

Technische Hochschule Köln
Campus Deutz
Betzdorfer Str. 2
50679 Köln
Raum: HW2-40

www.th-koeln.de

  reply	other threads:[~2019-08-20  9:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 16:50 change font-size in python plots depending on context Thomas S. Dye
2019-08-20  9:25 ` johanna.may [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-08-19  8:50 johanna.may
2019-08-19 11:10 ` Fraga, Eric

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blwk5gue.fsf@th-koeln.de \
    --to=johanna.may@th-koeln.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).