On Wednesday 18 May 2011 12:21:29 Mike Bonhoff wrote:
> Hallo,
> 
> I wanna make a graph and give it a title, say "name". I think this name is
> written under the graph normally. So I think creating a figure must be the
> right thing.
> 
> So I clicked Insert->Float->figure and gave the figure the "name" and
> inserted the graph.
> 
> But I have 2 problems:
> 
> 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. I read the handbook (German
> version) and there were some hints, especially for importing existing
> figures, but not a lot of hints how to create such a figure by yourself.
> 
> 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). \dir[dr] makes an arc to the
> element which is one step below (d for down) and one element to the right
> (r for right). I used to write \dir@{-}[dr] instead of \dir[dr] because
> that made an undirected edge instead of an arc. But that doesn't work
> anymore; I don't know why.
> 
> Is there a better way to do that, for example with tikz, and is it easy to
> use that within lyx? If not, how can I create simple edges in that
> xy-pic-environment and place the title under the figure.
> 
> Thanks!
> 
> Mike Bonhoff
Hi Mike

This forum is for documentation errors rather than help; you need to use the 
users forum for this sort of question.

However, in principle, a float is in a paragraph which can be centred and a 
figure can be centred within a float. If you want more detailed control, put 
the image in a minipage (box) in the float and then you can add spaces to move 
the material around in the minipage.

If you are using LaTeX directly, then pstricks is the normal way to create the 
sort or figure you want. In LyX I normally create the graph in another program 
and then import it as an image. Depending the layout of the maths and the size 
of the image, you can import it as an inline image, an image in its own 
paragraph, an image in a float or an image in a minipage (box).

However, you may get a more informed and enlightening answer if you use the 
users forum.

John

Reply via email to