1

What is the best way to typeset in LaTeX a graph of a binary relation on $\mathbb{R}$ similar to the following:

a graph

The bold lines denote a binary relation (consisting of three line segments).

porton
  • 1,218
  • "The best way" is to do it with whichever graphics package/method you're most familiar with and integrates with your workflow. We cannot possibly answer which way will be best for you without that information. – Paul Gessler May 01 '15 at 22:48
  • can i assume you'll be including some sort of visual aid? and incidentally, $$ no longer formats on this site, so you'll either have to trust us to read it correctly, or include an image. – aeroNotAuto May 01 '15 at 22:50
  • @PaulGessler I have created the above image with LibreOffice Draw and saved it as EPS. But probably it could be better with some LaTeX package. Which package integrating nicely with pdflatex can you suggest? – porton May 01 '15 at 22:50
  • @aeroNotAuto I don't understand you. What "including some sort of visual aid" does mean? Does this mean that I make a graph for visual aid of readers of my manuscript? If this is the question, then yes, I am doing a visual aid. – porton May 01 '15 at 22:51
  • @aeroNotAuto http://ibin.co/20H3KO2pkOkp is a direct link to an image – porton May 01 '15 at 22:52
  • @porton no, i meant a visual aid for us. it appears that i cannot see your image for some reason. this is the first time that's happened! – aeroNotAuto May 01 '15 at 22:53
  • @aeroNotAuto Probably you use a very old browser which does not support PNG files – porton May 01 '15 at 22:54
  • @porton i view other pngs using this browser, on this network, on this computer, navigating to this website all the time. but no matter. if paul can see it, he'll be of more help than i can be anyway. – aeroNotAuto May 01 '15 at 22:57
  • 2
    Please make sure that all images are uploaded using the official Stack Exchange interface, i.e. the image icon on top of the text field (shortcut: Ctrl+G). This ensures that all images will always be accessible and won't expire. – Paul Gessler May 01 '15 at 22:57
  • @PaulGessler I uploaded the image with Ctrl+G and replaced the link to the newly uploaded image – porton May 01 '15 at 23:00

1 Answers1

1

$\text{No MWE or attempt} \mapsto \text{minimal explanations from me}$. Everything covered here is introduced in Chapter 2 of pgfmanual or at Summary of Tikz commands. This is one way, but it may not be the best way:

\documentclass[tikz]{standalone}

\begin{document}
\begin{tikzpicture}
  \draw[thin,gray,text=black,<->] (0,1.4) node[left] {$y$}
                               |- (1.4,0) node[below] {$x\vphantom{1}$};
  \draw[densely dotted,gray] (1,0) |- (0,1);
  \draw[thick] (0,1) node[left] {$1$} 
           --  (0,0) node[below left] {$0$} 
           --  (1,0) node[below] {$1$}
               (0,0) -- (1,1);
\end{tikzpicture}
\end{document}

enter image description here

Paul Gessler
  • 29,607