Graphics, Figures & Tablestikz graph through dia export includes unwanted space

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
tikzkit
Posts: 2
Joined: Tue Sep 28, 2010 8:46 pm

tikz graph through dia export includes unwanted space

Post by tikzkit »

Hi!
I want to get rid of the space between the caption and the graph. I used the Dia export-function to generate this graph and have no clue what to change. Red = space i want to remove.
dia-sample.png
dia-sample.png (11.45 KiB) Viewed 4436 times

Code: Select all

Code, edit and compile here:
% Graphic for TeX using PGF
% Title: /home/dummy/Desktop/uni/postagging/LaTeX/images/mm.dia
% Creator: Dia v0.97
% CreationDate: Sun Sep 19 22:00:26 2010
% For: dummy
% \usepackage{tikz}
% The following commands are not supported in PSTricks at present
% We define them conditionally, so when they are implemented,
% this pgf file will use them.
\ifx\du\undefined
\newlength{\du}
\fi
\setlength{\du}{15\unitlength}
\begin{tikzpicture}[scale=0.87]
\pgftransformxscale{1.000000}
\pgftransformyscale{-1.000000}
\definecolor{dialinecolor}{rgb}{0.000000, 0.000000, 0.000000}
\pgfsetstrokecolor{dialinecolor}
\definecolor{dialinecolor}{rgb}{1.000000, 1.000000, 1.000000}
\pgfsetfillcolor{dialinecolor}
\definecolor{dialinecolor}{rgb}{1.000000, 1.000000, 1.000000}
\pgfsetfillcolor{dialinecolor}
\pgfpathellipse{\pgfpoint{7.600000\du}{7.500000\du}}{\pgfpoint{2.400000\du}{0\du}}{\pgfpoint{0\du}{2.500000\du}}
\pgfusepath{fill}
\pgfsetlinewidth{0.100000\du}
\pgfsetdash{}{0pt}
\pgfsetdash{}{0pt}
\pgfsetmiterjoin
\definecolor{dialinecolor}{rgb}{0.000000, 0.000000, 0.000000}
\pgfsetstrokecolor{dialinecolor}
\pgfpathellipse{\pgfpoint{7.600000\du}{7.500000\du}}{\pgfpoint{2.400000\du}{0\du}}{\pgfpoint{0\du}{2.500000\du}}
\pgfusepath{stroke}
% setfont left to latex
\definecolor{dialinecolor}{rgb}{0.000000, 0.000000, 0.000000}
\pgfsetstrokecolor{dialinecolor}
\node at (7.600000\du,7.495000\du){Regen};
\definecolor{dialinecolor}{rgb}{1.000000, 1.000000, 1.000000}
\pgfsetfillcolor{dialinecolor}
\pgfpathellipse{\pgfpoint{17.500000\du}{7.500000\du}}{\pgfpoint{2.500000\du}{0\du}}{\pgfpoint{0\du}{2.500000\du}}
\pgfusepath{fill}
\pgfsetlinewidth{0.100000\du}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Edit by localghost: No external links where applicable (see Board Rules). Attachments go onto the forum server.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

tikz graph through dia export includes unwanted space

Post by localghost »

Such drawings are preferably done by hand. These export mechanisms of such programs simply produce too much (low level) code.

Code: Select all

Code, edit and compile here:
\documentclass{minimal}
\usepackage{tikz}
\usetikzlibrary{automata,positioning}
\begin{document}
\begin{tikzpicture}[%
>=stealth,
shorten >=1pt,
node distance=3cm,
on grid,
auto,
state/.append style={minimum size=15mm},
thick
]
\node[state] (start) {Start};
\node[state] (regen) [below left of=start] {Regen};
\node[state] (sonne) [below right of=start] {Sonne};
\path[->] (start) edge node [swap] {0,6} (regen)
(start) edge node {0,4} (sonne)
(regen) edge [bend left=15] node {0,3} (sonne)
edge [loop left] node {0,7} ()
(sonne) edge [bend left=15] node {0,4} (regen)
edge [loop right] node {0,6} ();
\end{tikzpicture}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
See pgf/tikZ manual for details. Just put the tikzpicture into a usual figure environment.


Best regards and welcome to the board
Thorsten
Attachments
The diagram as produced by the provided code.
The diagram as produced by the provided code.
tikz-automata.png (15.86 KiB) Viewed 4435 times
Post Reply