Am 27.02.2015 um 19:34 schrieb Michael Berger:
On 02/27/2015 06:32 PM, Wolfgang Engelmann wrote:
I tried to use PGFplots in LyX. It is difficult for me, but after
some time I managed to get one figure drawn.
However, I do not know how to plot this figure in the way floating
objects are used so that I can cross reference to it and LyX takes
care of where this figure will be placed.
I did not find a cue in Ian's hint
http://chelseas-roost.co.uk/resources/lyx/PlottingGraphsInLyX.pdf
Does somebody know?
Wolfgang
Hi Wolfgang,
Your graphic is to be treated like any other figure / float.
Set the cursor after your plot and do
Insert > Float > Figure
then in the box that opens enter a name for that float.
Done.
Michael
Thanks, Michael,
and where would the label be inserted? If I do it as in the following:
Interessanterweise ... (Abbildung \ref{cap:kal-ar}).
LyX Document ##my remarks: \ref{cap:kal-ar} is in ERT, as is the
following, again in ERT, and [Do not forget!] is a short label
...
\end{tikzpicture}
\caption{\label{cap:kal-ar}[Do not forget!]{Do not forget! Make it
explicit enough that readers can figure out what you are doing.}
\end{figure}
I get this error:
LaTeX Warning: Reference `cap:kal-ar' on page 1 undefined on input line 259.
)
Runaway argument?
{\label {cap:kal-ar}[Spezieller Lichtpuls macht Blueten arrhythmisch]{\ETC.
! File ended while scanning use of \caption@xdblarg.
<inserted text>
\par
<*> TestTikZ.tex
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.
! Emergency stop.
<*> TestTikZ.tex
*** (job aborted, no legal \end found)