Here is a working example. I want to make
\pgfplothandlerclosedcurve
work like fit does. Therfore two steps would be required:
a) Make
\pgfplothandlerclosedcurve
accept labels such as (x) instead of
\pgfpoint{..}{..}
b) Ignore nodes in the middle like m in my example.
I hope this helps a bit.
Code: Select all
\RequirePackage{tikz}
\usetikzlibrary{fit}
\usetikzlibrary[plothandlers]
\documentclass{article}%,
\begin{document}
\begin{tikzpicture}
\draw[gray] (0,0) node (x) {x} (1,1) node (y) {y} (2,0) node (z) {z} (1,.5) node (m) {m};
\pgfplothandlerclosedcurve
\pgfplotstreamstart
\pgfplotstreampoint{\pgfpoint{0cm}{0cm}}
\pgfplotstreampoint{\pgfpoint{1cm}{1cm}}
\pgfplotstreampoint{\pgfpoint{2cm}{0cm}}
\pgfplotstreamend
\pgfusepath{stroke}
\node[ draw=gray, fit= (x)(y)(m)(z) , inner sep=0] (djk) {} ;
\end{tikzpicture}
\end{document}