emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: suvayu ali <fatkasuvayu+linux@gmail.com>
To: tcburt@rochester.rr.com
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Gather properties for use by babel source block?
Date: Wed, 3 Aug 2011 17:53:41 +0200	[thread overview]
Message-ID: <CAMXnza3sDAFQ+UWD-0rcUmMXKMC=MgeXU4rete0XG7Q8W3RwkA@mail.gmail.com> (raw)
In-Reply-To: <20110803143527.CD5TM.82842.root@hrndva-web16-z02>

Hello Tim,

On Wed, Aug 3, 2011 at 4:35 PM,  <tcburt@rochester.rr.com> wrote:
> While I have the table from org-collector I do not know how to "easily pass it to code blocks".

I have put an example of passing tables to gnuplot source blocks below.
I hope you can adapt it to the source block of your choice. It also
illustrates the noweb syntax.

I hope this helps.

-------8<----------------8<-------------

#+BABEL: :noweb yes :results silent

* Gnuplot source preamble                                               :src:
  #+srcname: gnuplot-preamble
  #+begin_src gnuplot
    reset
    set terminal pdfcairo color size 21cm,14.8cm
    set termoption enhanced
    set termoption font "DejaVuSerif,8"
    set grid back
    set style line 1 linewidth 2 linecolor rgb 'forest-green'
    set style line 2 linewidth 2 linecolor rgb 'red'
    set label '(pp \@ 7 TeV)' at graph -0.08,1.05
    set ylabel 'K-factor'
    set xlabel 'W invariant mass (GeV)'
    set title 'K-factor = {/Symbol s}_{NLO}/{/Symbol s}_{LO}'
  #+end_src

* HORACE K-factor
** Gnuplot source							:src:
#+srcname: plot-horace-k-factor
#+begin_src gnuplot :var data=horace-kfactor-nnlo-vs-nnlo-w-scale-err
  <<gnuplot-preamble>>
  set output "horace-kfactor.pdf"
  set label 'Standard Model W' at graph 0.5,0.67
  set xrange [0:1000]
  plot "$data" using 1:2 with linespoints linestyle 1 title 'Horace K-factor'
  set output
#+end_src

** K-factor with uncertainties

#+TBLNAME: horace-kfactor-nnlo-vs-nnlo-w-scale-err
| M (GeV) | K-factor |
|---------+----------|
|      50 |    1.075 |
|     150 |     1.01 |
|     250 |   0.9932 |
|     350 |   0.9778 |
|     450 |   0.9621 |
|     550 |   0.9498 |
|     650 |   0.9365 |
|     750 |   0.9253 |
|     850 |   0.9122 |
|     950 |   0.9001 |

-------8<----------------8<-------------

-- 
Suvayu

Open source is the future. It sets us free.

  reply	other threads:[~2011-08-03 15:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02 23:57 Gather properties for use by babel source block? Tim Burt
2011-08-03 14:00 ` darcamo
2011-08-03 14:35   ` tcburt
2011-08-03 15:53     ` suvayu ali [this message]
2012-05-07 15:52 ` Colin Hall
2012-05-07 14:16   ` Eric Schulte
2012-05-07 21:30     ` Colin Hall
2012-05-08 10:42   ` Tim Burt
2012-05-09 19:30     ` Colin Hall

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='CAMXnza3sDAFQ+UWD-0rcUmMXKMC=MgeXU4rete0XG7Q8W3RwkA@mail.gmail.com' \
    --to=fatkasuvayu+linux@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tcburt@rochester.rr.com \
    /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).