0

I'm trying to get the image in the middle of the first page directly after some texts, but it goes to the bottom of the second page ! I have tried many soltions in the forum but no one works .

This is a portion of the code :

\documentclass[12pt,a4paper]{report}
\usepackage[french]{babel}
\usepackage{palatino}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{tikz}

\begin{document}
    bla bla bla ...
\tikzset{every picture/.style={line width=0.75pt}} %set default line width to 0.75pt   
\begin{figure}
\begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1]
%   \node[inner sep=0pt] (blue) at (current page.center)
    %uncomment if require: \path (0,1324); %set diagram left start at 0, and has height of 1324
    
    %Shape: Ellipse [id:dp06581143408361845] 
    \draw  [color={rgb, 255:red, 5; green, 117; blue, 6 }  ,draw opacity=1 ][fill={rgb, 255:red, 220; green, 204; blue, 204 }  ,fill opacity=1 ][dash pattern={on 4.5pt off 4.5pt}] (100,1142.5) .. controls (100,1135.6) and (138.5,1130) .. (186,1130) .. controls (233.5,1130) and (272,1135.6) .. (272,1142.5) .. controls (272,1149.4) and (233.5,1155) .. (186,1155) .. controls (138.5,1155) and (100,1149.4) .. (100,1142.5) -- cycle ;
    %Shape: Ellipse [id:dp92431778511051] 
    \draw  [color={rgb, 255:red, 208; green, 2; blue, 27 }  ,draw opacity=1 ][fill={rgb, 255:red, 225; green, 212; blue, 214 }  ,fill opacity=1 ][dash pattern={on 4.5pt off 4.5pt}] (98,1087.5) .. controls (98,1080.6) and (136.5,1075) .. (184,1075) .. controls (231.5,1075) and (270,1080.6) .. (270,1087.5) .. controls (270,1094.4) and (231.5,1100) .. (184,1100) .. controls (136.5,1100) and (98,1094.4) .. (98,1087.5) -- cycle ;
    %Curve Lines [id:da8742288574213524] 
    \draw    (52,980) .. controls (179,1124.2) and (182,1126.2) .. (300,980) ;
    %Shape: Arc [id:dp049071290382092014] 
    \draw  [draw opacity=0] (267.64,1014.2) .. controls (269.24,1014.56) and (270.08,1014.93) .. (270.07,1015.3) .. controls (270.03,1017.9) and (227.51,1019.33) .. (175.11,1018.51) .. controls (123.37,1017.7) and (81.33,1014.98) .. (80.3,1012.42) -- (175.18,1013.81) -- cycle ; \draw   (267.64,1014.2) .. controls (269.24,1014.56) and (270.08,1014.93) .. (270.07,1015.3) .. controls (270.03,1017.9) and (227.51,1019.33) .. (175.11,1018.51) .. controls (123.37,1017.7) and (81.33,1014.98) .. (80.3,1012.42) ;  
    %Shape: Arc [id:dp32919036025871384] 
    \draw  [draw opacity=0][dash pattern={on 4.5pt off 4.5pt}] (79.59,1009.43) .. controls (82.08,1004.23) and (123.35,1001.18) .. (174.13,1002.56) .. controls (219.06,1003.79) and (256.89,1008.09) .. (267.12,1012.77) -- (174.66,1012.58) -- cycle ; \draw  [dash pattern={on 4.5pt off 4.5pt}] (79.59,1009.43) .. controls (82.08,1004.23) and (123.35,1001.18) .. (174.13,1002.56) .. controls (219.06,1003.79) and (256.89,1008.09) .. (267.12,1012.77) ;  
    %Straight Lines [id:da11105393341079917] 
    \draw    (180,1140) -- (208.97,1140.34) -- (306,1141.48) ;
    \draw [shift={(308,1141.5)}, rotate = 180.67] [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.75]    (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29)   ;
    %Straight Lines [id:da8366674717920943] 
    \draw    (180,1140) -- (85.69,1200.03) ;
    \draw [shift={(84,1201.1)}, rotate = 327.52] [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.75]    (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29)   ;
    %Straight Lines [id:da8293209658993197] 
    \draw    (180,1140) -- (180,982) ;
    \draw [shift={(180,980)}, rotate = 90] [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.75]    (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29)   ;
    %Curve Lines [id:da7388054843215917] 
    \draw    (50,1010) .. controls (34.16,1072.77) and (34,1114.56) .. (88.34,1139.26) ;
    \draw [shift={(90,1140)}, rotate = 203.72] [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.75]    (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29)   ;
    %Curve Lines [id:da08584894726934578] 
    \draw    (70,1020) .. controls (70,1020.39) and (62.24,1052.42) .. (88.76,1078.8) ;
    \draw [shift={(90,1080)}, rotate = 223.53] [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.75]    (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29)   ;
    %Curve Lines [id:da9980602067957789] 
    \draw    (90.01,1092.18) .. controls (90.26,1115.53) and (94.78,1133.6) .. (120,1140) ;
    \draw [shift={(90,1090)}, rotate = 90] [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.75]    (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29)   ;
    %Rounded Same Side Corner Rect [id:dp1826355202620027] 
    \draw  [color={rgb, 255:red, 72; green, 3; blue, 253 }  ,draw opacity=1 ][fill={rgb, 255:red, 225; green, 210; blue, 210 }  ,fill opacity=1 ][dash pattern={on 4.5pt off 4.5pt}] (400,1086) .. controls (400,1077.16) and (407.16,1070) .. (416,1070) -- (544,1070) .. controls (552.84,1070) and (560,1077.16) .. (560,1086) -- (560,1150) .. controls (560,1150) and (560,1150) .. (560,1150) -- (400,1150) .. controls (400,1150) and (400,1150) .. (400,1150) -- cycle ;
    %Curve Lines [id:da43313272890237364] 
    \draw    (250,1170) .. controls (347.52,1188.91) and (380.02,1181.43) .. (418.25,1170.5) ;
    \draw [shift={(420,1170)}, rotate = 163.98] [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.75]    (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29)   ;
    %Straight Lines [id:da7788716804761062] 
    \draw    (480,1150) -- (480,1022) ;
    \draw [shift={(480,1020)}, rotate = 90] [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.75]    (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29)   ;
    %Straight Lines [id:da9908845824428074] 
    \draw    (360,1150) -- (598,1150) ;
    \draw [shift={(600,1150)}, rotate = 180] [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.75]    (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29)   ;
    
    % Text Node
    \draw (281,1002.4) node [anchor=north west][inner sep=0.75pt]    {$\mathbb{H}$};
    % Text Node
    \draw (354,455.4) node [anchor=north west][inner sep=0.75pt]    {$$};
    % Text Node
    \draw (284,1072.4) node [anchor=north west][inner sep=0.75pt]    {$\mathbb{K}$};
    % Text Node
    \draw (281,1112.4) node [anchor=north west][inner sep=0.75pt]    {$\mathbb{D}$};
    % Text Node
    \draw (51,1052.4) node [anchor=north west][inner sep=0.75pt]    {$\Psi $};
    % Text Node
    \draw (31,1112.4) node [anchor=north west][inner sep=0.75pt]    {$\Phi $};
    % Text Node
    \draw (71,1102.4) node [anchor=north west][inner sep=0.75pt]    {$F$};
    % Text Node
    \draw (325,1192.4) node [anchor=north west][inner sep=0.75pt]    {$G$};
    % Text Node
    \draw (381,1042.4) node [anchor=north west][inner sep=0.75pt]    {$U$};

\end{tikzpicture}
 \caption{Isometries among the hyperbolic models}
\end{figure}

\end{document}
6
  • If you add \fbox{...} around the tikzpicture you'll notice that LaTeX sees this image as being much much larger than just the visible parts
    – daleif
    Commented Apr 28, 2022 at 14:04
  • 1
    What is this line suppose to do: \draw (354,455.4) node [anchor=north west][inner sep=0.75pt] {$$};
    – daleif
    Commented Apr 28, 2022 at 14:06
  • BTW yuo might want to use \begin{figure}[htbp] the h is not part of the default value.
    – daleif
    Commented Apr 28, 2022 at 14:07
  • \draw(...; I delet it .
    – Abdelhakim
    Commented Apr 28, 2022 at 14:10
  • Works fine for me
    – daleif
    Commented Apr 28, 2022 at 14:10

1 Answer 1

1

The line

\draw (354,455.4) node [anchor=north west][inner sep=0.75pt]    {$$};
  1. will not print anything
  2. is in a completely different location than the other items on the image.

Because of 2. the bounding box calculation ends up being wrong.

Solution, remove or out comment that line.

PS: you might want to use \begin{figure}[htbp]

enter image description here

3
  • Thank you @deleif !
    – Abdelhakim
    Commented Apr 28, 2022 at 14:14
  • @Abdelhakim remember to hit the check mark if you accept the answer
    – daleif
    Commented Apr 28, 2022 at 14:15
  • Okey :) @deleif
    – Abdelhakim
    Commented Apr 28, 2022 at 14:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .