Quantcast
Channel: How to draw dashes and pipe lines in latex and add text below them - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 2

Answer by Zarko for How to draw dashes and pipe lines in latex and add text below them

$
0
0

enter image description here

bar symbol is defined in arrows or better use arrows.meta library:

\begin{tikzpicture}\draw [thick, dash dot, Bar-Bar] (0,1) -- (5,1);\end{tikzpicture}

edit:it seems that you looking for this:

enter image description here

in above image are not used Bars but drawn short vertical lines for ticks. for more concise text below number on line is used trick for reduce line spacing. so far i change font family only for text below tick labels (-1, ... 1). but this is simply change.

\documentclass[tikz, margin=3mm]{standalone}\begin{document}    \begin{tikzpicture}[    LT/.style = {% Label Text                 text width=22mm, inner sep=0mm, outer sep=1mm,                 align=center, font=\small\sffamily\linespread{0.84}\selectfont,                 below                 }                        ]\def\faktor{4} % define distance between ticks    \draw[densely dotted]   (-\faktor,0) -- (\faktoe,0);                            \foreach \i/\j in {-1.0/strong negative relationship,                      -0.5/,                        0.0/weak or non relationship,                       0.5/,                       1.0/strong positive relationship}    {    \draw    (\faktor*\i,1mm)  -- ++ (0,-2mm) node[LT] {\i \\ \j};    }    \end{tikzpicture}\end{document}

Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>