jeudi 4 décembre 2014

How Can I Shorten This?


I am trying to create the marks needed for this graph and this process is very lengthy. Is there a shorter way I could do this? I am trying to create a mark at every 1/6 mark between 1 and 6 so that I can place each interval. Here is what I'm trying to create:


enter image description here



\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=2]
\draw [-] (0,0)--coordinate(x axis mid)(6,0);
\foreach\x/\xtext in {0,{1/6}/{1/6},{2/6}/{2/6},
{3/6}/{3/6},{4/6}/{4/6},{5/6}/{5/6},1,{7/6}/{7/6},6}
\draw[shift={(\x,0)}] (0pt,0pt)--(0pt,-2pt);
\draw [-] (0,0)--coordinate(y axis mid)(0,4);
\end{tikzpicture}
\end{document}


If I need to just hardcode everything then just let me know.





Aucun commentaire:

Enregistrer un commentaire