Desenhe este gráfico em Tikz (com eixos negativos)

Desenhe este gráfico em Tikz (com eixos negativos)

Estou tentando gerar a seguinte figura usando tikz:

insira a descrição da imagem aqui

No entanto, minha melhor tentativa me leva a isso (que não é bem o que eu quero):

insira a descrição da imagem aqui

Aqui há um MWE (há algum texto que é diferente; mas esse não é o objetivo da questão):

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{fit, calc, matrix, positioning, arrows, intersections, through, backgrounds, patterns}

\begin{document}
\begin{figure}[!htb]
\centering
\begin{tikzpicture}[my plot/.style={thick, smooth, samples=100, domain=0:1}, my grid/.style={densely dotted,opacity=0.5, every node/.style={black,opacity=1}}, my axis/.style={latex-latex},scale=0.75]
\coordinate (start plot) at (0,{(0)});
\coordinate (end plot) at (4,{(4)});
\draw[my axis] ([shift={(-0cm,0cm)}]start plot |- end plot) node[above] {$h_2$} |- node[coordinate](origin){} ([shift={(0cm,-0cm)}]start plot -| end plot) node[right] {$h_1$};
\def\x{0.5}\def\y{4}\def\p{0.55}
\coordinate (Ux) at (4.5,{(0)});
\coordinate (Uy) at (0,{(1.5)});
\coordinate (Ua) at (0,{(6)});
\coordinate (Ub) at (6,{(0)});
\coordinate (Uc) at (3,{(0)});
\coordinate (Ud) at (0,{(3)});
\coordinate (Ue) at (1.5,{(0)});
\coordinate (Uf) at (0,{(4.5)});
\coordinate (Ug) at (0,{(0)});
\coordinate (Uh) at (4.5,{(4.5)});
\coordinate (Ui) at (2,{(2)});
\coordinate (Uj) at (1.5,{(1.5)});
\coordinate (Uk) at (3,{(3)});
\coordinate (Ul) at (1.5,{(4)});
\coordinate (Um) at (4,{(1.5)});
\draw[my grid] (Uy) |- node[left,font=\scriptsize]{$1$} cycle;
\draw[my grid] (Uc) |- node[below,font=\scriptsize]{$2$} cycle;
\draw[my grid] (Ud) |- node[left,font=\scriptsize]{$2$} cycle;
\draw[my grid] (Ue) |- node[below,font=\scriptsize]{$1$} cycle;
\draw[fill] (Ug) circle (2pt);
\draw[fill] (Uj) circle (2pt);
\draw[fill] (Uk) circle (2pt);
\node [below] at (Ug) {\footnotesize{$h(T,R)=H(B,L)$}};
\node [below, xshift=10pt] at (Uj) {\footnotesize{$h(T,L)$}};
\node [right] at (Uk) {\footnotesize{$h(B,R)$}};
\node [left] at (Uj) {\footnotesize{$C(G)$}};
\draw[-] (Uj) -- (Ug);
\draw[-] (Uk) -- (Uj);
\draw[-] (Uj) -- (Ul);
\draw[-] (Uj) -- (Um);
\end{tikzpicture}
\end{document}

Meu principal problema aqui é que literalmente não tenho ideia de como obter o gráfico com eixos x e y negativos. Alguém poderia me ajudar a obter o resultado desejado?

Obrigado a todos!

Responder1

Aqui está um pequeno código com um desenho semelhante. Não mudei a fonte porque não sei o nome dela.

\documentclass{article}

\usepackage{tikz}

\begin{document}

    \begin{tikzpicture}[scale = 2]
    % axis drawing
    \draw [->] (0,-2) -- (0,2);
    \draw [->] (-2,0) -- (2,0);

    \node[below] at (-1,0) {$-1$};
    \node[below] at (1,0) {$1$};
    \node[left] at (0,-1) {$-1$};
    \node[left] at (0,1) {$1$};
    \node[right] at (2,0) {$h_1$};
    \node[above] at (0,2) {$h_2$};

    % diagonal drawing
    \draw[thick] (-1,1) -- (1,-1);
    \draw[fill] (-1,1) circle [radius=0.05];
    \draw[fill] (1,-1) circle [radius=0.05];

    \node[below right] at (1,-1) {$h(H,H) = h(T,T)$};
    \node[above left] at (-1,1) {$h(T,H) = h(H,T)$};
    \node[below] at (-1,0.7) {$C(G)$};

    % axis 2 drawing
    \draw (1,2.1) -- (1,1) -- (2.1,1);
    \node[right] at (2.1,1) {$R_2=1$};
    \node[above] at (1,2.1) {$R_1=1$};

    \end{tikzpicture}

\end{document}

desenho gráfico

Responder2

Devo confessar que fiquei perdido no seu MWE... conseqüentemente não tive sucesso em encontrar onde você comete erros no posicionamento dos elementos da imagem. Em vez disso, redesenhei a imagem do zero (não é grande coisa, é bastante simples):

\documentclass [tikz, margin=3mm]{standalone}
\usetikzlibrary{arrows}
\usepackage{sansmath}

\begin{document}
    \begin{tikzpicture}[
every node/.style = {font=\sansmath, color=blue!70!black}
TL/.append style = {font=\sffamily\scriptsize}% TL: Tick Labels
                        ]
% axis
\draw[->] (-3,0)   -- (3,0) node[right] {$h_1$};
\draw[->] (0,-2.5) -- (0,3) node[above] {$h_2$};
% tick
\foreach \i in {-2,-1,1,2}
    \draw (\i,2pt) -- ++ (0,-4pt)   node[TL,below] {\i}
          (2pt,\i) -- ++ (-4pt,0)   node[TL, left] {\i};
% curve (line)
\draw[thick,*-*]    (-1,1) node[left]  {$h(T,H)=h(H,T)$}
                --  (1,-1) node[right] {$h(H,H)=h(T,T)$};       
% R coordinate system?
\draw   (1,2) node[above]  {$R_1=1$}
    |-  (2,1) node[right]  {$R_2=1$};
\end{tikzpicture}
\end{document}

insira a descrição da imagem aqui

informação relacionada