From mboxrd@z Thu Jan 1 00:00:00 1970 From: suvayu ali Subject: Re: Gather properties for use by babel source block? Date: Wed, 3 Aug 2011 17:53:41 +0200 Message-ID: References: <20110803143527.CD5TM.82842.root@hrndva-web16-z02> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qodlj-00016y-Gn for emacs-orgmode@gnu.org; Wed, 03 Aug 2011 11:54:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qodli-00068G-DH for emacs-orgmode@gnu.org; Wed, 03 Aug 2011 11:54:03 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:61774) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qodli-000684-6z for emacs-orgmode@gnu.org; Wed, 03 Aug 2011 11:54:02 -0400 Received: by eye22 with SMTP id 22so221991eye.0 for ; Wed, 03 Aug 2011 08:54:01 -0700 (PDT) In-Reply-To: <20110803143527.CD5TM.82842.root@hrndva-web16-z02> 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: tcburt@rochester.rr.com Cc: emacs-orgmode Hello Tim, On Wed, Aug 3, 2011 at 4:35 PM, 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 <> 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.