* Re: Plotting with gnuplot
[not found] <6ge28cxntv.ln2@news.c0t0d0s0.de>
@ 2015-07-22 1:02 ` Thomas S. Dye
[not found] ` <58n38cx51a.ln2@news.c0t0d0s0.de>
2015-07-22 10:17 ` Eric S Fraga
1 sibling, 1 reply; 5+ messages in thread
From: Thomas S. Dye @ 2015-07-22 1:02 UTC (permalink / raw)
To: Michael Welle; +Cc: emacs-orgmode
Aloha Michael,
Does the :session header argument help?
All the best,
Tom
Michael Welle <mwe012008@gmx.net> writes:
> Hello,
>
> I have several sections in my org files that plot data with gnuplot. The
> structure usually looks like that:
>
> #+tblname: foo
> | d | y |
> |------------------+------|
> | [2015-01-03 Sat] | 2014 |
> | [2013-12-31 Tue] | 2013 |
> #+begin_src gnuplot :var data=foo :file img/foo.png
> set terminal png
> set xlabel foo
> ...
> plot data using 1:2 with boxes title ''
> #+end_src
>
>
> The problem is that the gnuplot scripts are evaluated in the same
> gnuplot instance. If I set, for instance, xlabel in one gnuplot script
> it is still set in the next script. That is quite annoying. I tried to
> end the scripts with a quit statement, but that results in a 'current
> buffer has no process' error. A reset statement at the beginning of the
> script makes the situation better, but isn't a solution. Any ideas?
>
> Regards
> hmw
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Plotting with gnuplot
[not found] <6ge28cxntv.ln2@news.c0t0d0s0.de>
2015-07-22 1:02 ` Plotting with gnuplot Thomas S. Dye
@ 2015-07-22 10:17 ` Eric S Fraga
1 sibling, 0 replies; 5+ messages in thread
From: Eric S Fraga @ 2015-07-22 10:17 UTC (permalink / raw)
To: Michael Welle; +Cc: emacs-orgmode
On Tuesday, 21 Jul 2015 at 20:09, Michael Welle wrote:
> Hello,
>
> I have several sections in my org files that plot data with gnuplot. The
> structure usually looks like that:
[...]
> The problem is that the gnuplot scripts are evaluated in the same
> gnuplot instance.
The solution is to reset all the settings:
#+begin_src gnuplot :var data=foo :file img/foo.png
reset
set terminal png
set xlabel foo
...
plot data using 1:2 with boxes title ''
#+end_src
--
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1293-g985420
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Plotting with gnuplot
[not found] ` <58n38cx51a.ln2@news.c0t0d0s0.de>
@ 2015-07-22 15:36 ` Thomas S. Dye
[not found] ` <67f68cxgrc.ln2@news.c0t0d0s0.de>
0 siblings, 1 reply; 5+ messages in thread
From: Thomas S. Dye @ 2015-07-22 15:36 UTC (permalink / raw)
To: Michael Welle; +Cc: emacs-orgmode
Michael Welle <mwe012008@gmx.net> writes:
> Hello,
>
> Thomas S. Dye <tsd@tsdye.com> writes:
>
>> Aloha Michael,
>>
>> Does the :session header argument help?
> I tried it with no success, mostly because I used it wrong I guess ;). I
> tried :session, :session t, :session nil and :session {foo|bar}. But
> :session none seems to work.
With two code blocks, use :session foo for one and :session bar for the
other. Does your problem persist?
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Plotting with gnuplot
[not found] ` <67f68cxgrc.ln2@news.c0t0d0s0.de>
@ 2015-07-23 17:29 ` Thomas S. Dye
2015-07-29 9:50 ` Ian Barton
1 sibling, 0 replies; 5+ messages in thread
From: Thomas S. Dye @ 2015-07-23 17:29 UTC (permalink / raw)
To: Michael Welle; +Cc: emacs-orgmode
Michael Welle <mwe012008@gmx.net> writes:
> Hello,
>
> Thomas S. Dye <tsd@tsdye.com> writes:
>
>> Michael Welle <mwe012008@gmx.net> writes:
>>
>>> Hello,
>>>
>>> Thomas S. Dye <tsd@tsdye.com> writes:
>>>
>>>> Aloha Michael,
>>>>
>>>> Does the :session header argument help?
>>> I tried it with no success, mostly because I used it wrong I guess ;). I
>>> tried :session, :session t, :session nil and :session {foo|bar}. But
>>> :session none seems to work.
>>
>> With two code blocks, use :session foo for one and :session bar for the
>> other. Does your problem persist?
> yepp, that was the idea. But no success.
The documentation in ob-doc-gnuplot doesn't mention sessions. I think
it would be well to note the current behavior.
I see in ob-gnuplot that "The current `gnuplot-mode' doesn't provide
support for multiple sessions" which presumably cripples the behavior of
the :session header argument.
Can an ob-gnuplot user summarize the behavior of :session with gnuplot
source blocks?
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Plotting with gnuplot
[not found] ` <67f68cxgrc.ln2@news.c0t0d0s0.de>
2015-07-23 17:29 ` Thomas S. Dye
@ 2015-07-29 9:50 ` Ian Barton
1 sibling, 0 replies; 5+ messages in thread
From: Ian Barton @ 2015-07-29 9:50 UTC (permalink / raw)
To: emacs-orgmode
On Thu, Jul 23, 2015 at 08:46:30AM +0200, Michael Welle wrote:
> > With two code blocks, use :session foo for one and :session bar for the
> > other. Does your problem persist?
> yepp, that was the idea. But no success.
>
If I understand the problem correctly, you need to put reset as the
first argument:
#+begin_src gnuplot :var data2015=days_cycling[2:-5] :var data2014=days_cycling[3:-4] :var data2013=days_cycling[4:-4,] :var data2012=days_cycling[5:-4,] :file ../images/number_of_days_cycling.png
reset
set title 'Number of Days Cycling Each Month.'
# set ylabel 'Days' set xlabel 'Speed Mbps' lw2
set style data histogram
set style histogram cluster gap 1
set style fill solid border -1
set boxwidth 0.9
set xlabel 'Month'
set ylabel 'Days'
plot data2015 u 5:xticlabels(1) title "2015", data2014 u 4:xticlabels(1) title "2014", data2014 u 3:xticlabels(1) title "2013", data2014 u 2:xticlabels(1) title "2012"
#+end_src
I have holes in my foor from using that particular gun.
--
Best wishes,
Ian.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-29 9:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <6ge28cxntv.ln2@news.c0t0d0s0.de>
2015-07-22 1:02 ` Plotting with gnuplot Thomas S. Dye
[not found] ` <58n38cx51a.ln2@news.c0t0d0s0.de>
2015-07-22 15:36 ` Thomas S. Dye
[not found] ` <67f68cxgrc.ln2@news.c0t0d0s0.de>
2015-07-23 17:29 ` Thomas S. Dye
2015-07-29 9:50 ` Ian Barton
2015-07-22 10:17 ` Eric S Fraga
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.