|
From: James R. V. Z. <jr...@co...> - 2006-07-15 02:35:55
|
Bob Fletcher <rob...@kn...> wrote:
> On Fri, 2006-07-14 at 11:52 -0700, Ethan Merritt wrote:
> > On Friday 14 July 2006 10:56 am, Bob Fletcher wrote:
> > >
> snip
> > Taking a step to the side ...
> > As I understand it, what you want to do is import the plot into
> > an OpenOffice doc. I would suggest to you that even if you get
> > the X11 cut/paste working, this is a poor solution to the task
> > at hand. You would be better off binding a hotkey to a command
> > sequence like:
> >
> > "set term push; set term png; set output /tmp/plot.png; \
> > replot; set term pop"
>
> OK, thanks Ethan. I still haven't been able to get the hot key binding
> to work properly, but I can enter the commands on the command line and
> create the .png (or .emf) file. As you said, I can then drag this new
> file into the OO document.
I import a *lot* of gnuplot figures into MSOffice documents. For
each figure, I create a gnuplot script that creates whatever file I
will later want to import, then plots to a window:
set label "az" at graph 1,1.015 right font "times,6"
set term cgm
set output "az.cgm"
splot 'az.dat' title 'beamsize' with lines, \
sin(u),cos(u),0 ti 'horizon', \
sin(u/4), 0, cos(u/4) ti 'elscan'
set output
set term emf; set output "az.emf"; replot; set output
set term `if [ "$DISPLAY" = "" ]; then echo linux; else echo x11; fi;`
replot
The window display is last so it's interactive.
I only use vector formats for importing (usually cgm, sometimes emf,
never png) because they're smaller, they scale, and they look better.
I save the gnuplot script so I can tweak the input data and easily
re-create the figure. Usually I automate this with a Makefile with
lots of sections like this:
az.cgm az.ps: az.dem az.dat
gnuplot $<
The only part that isn't automated is updating the figures in the
MSOffice document. Maybe I should be "linking" instead of "embedding"
the figures. I assume OpenOffice has something of that sort too.
- Jim Van Zandt
|