I have a command to draw some lines through a text:
\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\scalebox{0}{%
\begin{tikzpicture}
\begin{axis}[hide axis]
\addplot [
color=orange,
solid,
line width=1.3pt,
forget plot
]
(0,0);\label{oranged}
\addplot [
color=red!30.6!green!0!blue!55.7!,
densely dashed,
line width=1.7pt,
forget plot
]
(0,0);\label{purpled}
\addplot [
color=green,
dash pattern={on 10pt off 2pt},
line width=1.6pt,
forget plot
]
(0,0);\label{greened}
\end{axis}
\end{tikzpicture}%
}%
I have \ref{purpled} and \ref{oranged} and \ref{greened}.
\end{document}
This command creates lines with a special length. I did anything to increase the length of the lines, although I was not succesful. does anyone know how we reach this goal.
Best Answer
Not sure I understand exactly what you are attempting to do, but it is better to just use
tikz
directly to draw instead of usingpgfplots
.In the code below, the
\DrawLine
macro will draw a line of a given length with given draw parameters. I used\DrawLine
to define\Purpled
,\Greened
and\Oranged
which yields the second line below:Code: