undirected graph with capture

2011-05-20 Thread Mike Bonhoff
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]bc\\def} 

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


-- 
NEU: FreePhone - kostenlos mobil telefonieren!  
Jetzt informieren: http://www.gmx.net/de/go/freephone


Re: undirected graph with capture

2011-05-20 Thread Paul A . Rubin
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]bc\\def} 
 
 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






undirected graph with capture

2011-05-20 Thread Mike Bonhoff
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]bc\\def} 

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


-- 
NEU: FreePhone - kostenlos mobil telefonieren!  
Jetzt informieren: http://www.gmx.net/de/go/freephone


Re: undirected graph with capture

2011-05-20 Thread Paul A . Rubin
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]bc\\def} 
 
 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






undirected graph with capture

2011-05-20 Thread Mike Bonhoff
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]\\d} 

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


-- 
NEU: FreePhone - kostenlos mobil telefonieren!  
Jetzt informieren: http://www.gmx.net/de/go/freephone


Re: undirected graph with capture

2011-05-20 Thread Paul A . Rubin
Mike Bonhoff  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]\\d} 
> 
> 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