Tikz picture position

by mathali   Last Updated August 01, 2020 14:23 PM

I want to take this figure opposite to 1 , how can I do? Actually how can I change picture's position as I want?

 \documentclass[twocolumn,10pt]{article}
    \usepackage{pgf,tikz,pgfplots}
    \pgfplotsset{compat=1.15}
    \usepackage{mathrsfs}
    \usetikzlibrary{arrows}
    \pagestyle{empty}
    
    
    
    
    \begin{document}
    \definecolor{wrwrwr}{rgb}{0.3803921568627451,0.3803921568627451,0.3803921568627451}
    \definecolor{rvwvcq}{rgb}{0.08235294117647059,0.396078431372549,0.7529411764705882}
    \textbf{1)}\newline
    \begin{tikzpicture}[scale=0.8, line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
    \clip(-5.003269918455611,-3.3529348860915125) rectangle (10.415703512539228,5.13457342454785);
    \fill[line width=2.pt,color=rvwvcq,fill=rvwvcq,fill opacity=0.10000000149011612] (-1.16,2.85) -- (-3.82,-1.57) -- (3.56,-1.55) -- cycle;
    \draw [line width=2.pt,color=rvwvcq] (-1.16,2.85)-- (-3.82,-1.57);
    \draw [line width=2.pt,color=rvwvcq] (-3.82,-1.57)-- (3.56,-1.55);
    \draw [line width=2.pt,color=rvwvcq] (3.56,-1.55)-- (-1.16,2.85);
    \draw [line width=2.pt,color=wrwrwr] (-1.16,2.85)-- (-2.7200080786122416,-1.56701899208296);
    \draw [line width=2.pt,color=wrwrwr] (-1.16,2.85)-- (-0.9600210043918271,-1.562249379415696);
    \draw [line width=2.pt,color=wrwrwr] (-1.16,2.85)-- (1.1000722668585952,-1.5566664708215214);
    \draw [line width=2.pt,color=wrwrwr] (-1.16,2.85)-- (2.4001169195517105,-1.5531433145811606);
    \draw [line width=2.pt,color=wrwrwr] (-3.82,-1.57)-- (0.2994927758991701,1.4894558868736556);
    \draw [line width=2.pt,color=wrwrwr] (-3.82,-1.57)-- (1.60355056870581,0.27380879188441476);
    \begin{scriptsize}
    \draw [fill=rvwvcq] (-1.16,2.85) circle (2.5pt);
    \draw [fill=rvwvcq] (-3.82,-1.57) circle (2.5pt);
    \draw [fill=rvwvcq] (3.56,-1.55) circle (2.5pt);
    \draw [fill=rvwvcq] (-2.7200080786122416,-1.56701899208296) circle (2.5pt);
    \draw [fill=rvwvcq] (-0.9600210043918271,-1.562249379415696) circle (2.5pt);
    \draw [fill=rvwvcq] (1.1000722668585952,-1.5566664708215214) circle (2.5pt);
    \draw [fill=rvwvcq] (2.4001169195517105,-1.5531433145811606) circle (2.5pt);
    \draw [fill=rvwvcq] (0.2994927758991701,1.4894558868736556) circle (2.5pt);
    \draw [fill=rvwvcq] (1.60355056870581,0.27380879188441476) circle (2.5pt);
    \end{scriptsize}
    \end{tikzpicture}
    \end{document}

enter image description here

I want to like that

I want like that

Tags : tikz-pgf


Answers 1


Add the following line in the code

\tikz[baseline={([yshift=-1.2cm]current bounding box.west)}]{}

enter image description here

\documentclass[twocolumn,10pt]{article}
    \usepackage{pgf,tikz,pgfplots}
    \pgfplotsset{compat=1.15}
    \usepackage{mathrsfs}
    \usetikzlibrary{arrows}
    \pagestyle{empty}
    
    \begin{document}
    \definecolor{wrwrwr}{rgb}{0.3803921568627451,0.3803921568627451,0.3803921568627451}
    \definecolor{rvwvcq}{rgb}{0.08235294117647059,0.396078431372549,0.7529411764705882}
    \textbf{1)}\tikz[baseline={([yshift=-1.2cm]current bounding box.west)}]{
    \begin{tikzpicture}[scale=0.8, line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
    \clip(-5.003269918455611,-3.3529348860915125) rectangle (10.415703512539228,5.13457342454785);
    \fill[line width=2.pt,color=rvwvcq,fill=rvwvcq,fill opacity=0.10000000149011612] (-1.16,2.85) -- (-3.82,-1.57) -- (3.56,-1.55) -- cycle;
    \draw [line width=2.pt,color=rvwvcq] (-1.16,2.85)-- (-3.82,-1.57);
    \draw [line width=2.pt,color=rvwvcq] (-3.82,-1.57)-- (3.56,-1.55);
    \draw [line width=2.pt,color=rvwvcq] (3.56,-1.55)-- (-1.16,2.85);
    \draw [line width=2.pt,color=wrwrwr] (-1.16,2.85)-- (-2.7200080786122416,-1.56701899208296);
    \draw [line width=2.pt,color=wrwrwr] (-1.16,2.85)-- (-0.9600210043918271,-1.562249379415696);
    \draw [line width=2.pt,color=wrwrwr] (-1.16,2.85)-- (1.1000722668585952,-1.5566664708215214);
    \draw [line width=2.pt,color=wrwrwr] (-1.16,2.85)-- (2.4001169195517105,-1.5531433145811606);
    \draw [line width=2.pt,color=wrwrwr] (-3.82,-1.57)-- (0.2994927758991701,1.4894558868736556);
    \draw [line width=2.pt,color=wrwrwr] (-3.82,-1.57)-- (1.60355056870581,0.27380879188441476);
    \end{tikzpicture}}
    \end{document}
js bibra
js bibra
August 01, 2020 14:05 PM

Related Questions




Drawing similar picture with tikz

Updated November 20, 2018 12:23 PM

Complicated curves interwined in the link figures

Updated December 17, 2018 22:23 PM

Complicated curves intertwined in the link figures (II)

Updated December 18, 2018 02:23 AM