Mike Bonhoff <lyx-user <at> gmx.de> writes: > 1st: The "name" is centered, that means in the middle of the paper to the > left and right. On the other hand, my figure is on the left side. > > I don't know how I can center the figure, too.
Place the cursor alongside the graph and use the paragraph settings button (or Edit > Paragraph Settings) to center the "paragraph" containing the graph. > > 2nd: I wanted to create an undirected graph and choose to do it with an > x-y-pic-matrix with this code within the math mode: > > \xymatrix{a\dir[dr]&b&c\\d&e&f} > > That creates an xy-pic-matrix with 2 rows (because of the \\ command) and > 3 rows (because of the 2-times & command). The following steps work: 1. Inside the math inset, type '\xymatrix' and hit the space bar. That creates an inset for the upper left cell of the matrix. 2. Use the Add row and Add column buttons in the math tool bar to expand the matrix to two rows and three columns. 3. In the first cell, type 'a\ar@'. Then type '\{' which will add a pair of braces with an inset between them. Type a dash (-) in the inset. 4. Move the cursor just outside the braces and type '[dr]'. 5. Finish the matrix entries. > Is there a better way to do that, for example with tikz, and is it easy to > use that within lyx? Choosing between Xy-pic and TiKZ is a matter of taste. You can type TiKZ/PGF commands into a LaTeX (ERT) insert. (You also need to load TiKZ and any required libraries in the preamble.) There is a manual for using Xy-pic in LyX (by H. Peter Gumm) included with LyX (on the Help menu). Paul