Rich Shepard wrote:
> I know that many of you use xfig and I would like pointers to two
> tasks I
> need to do frequently: 1) draw S-, Z- or bell curves that are smooth
> and, in the latter case, symetrical
I have no idea. There must be an xfig-users mailing list though...
Alternatively, since this is "programming" rather than "drawing by
hand", either follow Herbert's suggestion and use PSTricks or use
gnuplot and export to xfig. I posted a script to the list a little
while ago that will handle gnuplot-> xfig export beautifully. Search
for "gnuplot2fig.sh".
$ cat fig.gplt
plot erf(x)
$ gnuplot
gnuplot> load "fig.gplt"
gnuplot> quit
$ gnuplot2fig.sh fig.gplt fig.fig
$ cat fig1.gplt_commands
set border 3
set xtics nomirror
set ytics nomirror
set xrange [0:1]
set yrange [0.7:1.3]
set xlabel "Position, $x$"
set ylabel "Velocity, $v$"
v(x)=1-0.25*cos(2*pi*x)
plot v(x) title "$v(x)=1.0-\\\\frac{1}{4}\\\\cos(2\\\\pi{}x)$"
You get the idea... The only pain is that you have to escape
backslashes. The above ends up after gnuplot->xfig->latex as the
latex string: $v(x)=1.0-\frac{1}{4}\cos(2\pi{}x)$
> and 2) enter Greek letters, math symbols and equations
> on the figure.
This I can answer. Enter the text as a latex string (The "T" symbol on
the side bar) Eg "An equation: $E=mc^2$ plus text." Now hit the
"Edit" button on the sidebar and click on this text. The text
properties dialog pops up. Set the "Special Flag" to "Special".
Finally export your image (File->Export...). Set the "Language" to
"Combined PS/Latex (both parts)". This will lead to the generation of
two files "<your file>.pstex_t" and "<your file>.pstex". The latter
is a PostScript file containing your image (without the text). The
former is a snippet of latex defining a latex picture environment
that:
a) includes the PostScript file.
b) places the latex string "An equation: $E=mc^2$ plus text." at the
correct place on top of this PostScript file.
How to get this into LyX?
a) Use the External inset with <your file>.fig. Set the template to
"XFIG". LyX will take care of the generation of the exported files
for you.
b) Use the Include inset with <your file>.pstex_t. You'll have to
handle the generation of the exported files, but you will get a
pretty-preview inside of LyX if you turn previewing on.
LyX 1.4.x will give you a truly powerful External Inset that will be
able to handle export to PDF also (+ give you a preview in the LyX
window).
--
Angus