Quantcast
Channel: Tikz pattern size in spy - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 2

Tikz pattern size in spy

$
0
0

enter image description here

I have a problem using pattern to fill shapes:

I've a shape thats filled with a self-defined pattern (simple dots with the same distance) and i want to zoom at one corner of the shape. I do this with spy (magnification=10). Now inside the magnification the distance between the dots is the same as in the real picture, but i want them to be scaled also. Does anyone know how to do this?Thanks for helping

\documentclass[10pt,a4paper]{article}\usepackage[latin1]{inputenc}\usepackage{amsmath}\usepackage{amsfonts}\usepackage{amssymb}\usepackage{graphicx}\usepackage{tikz}\usetikzlibrary{arrows, plotmarks, patterns, spy}\usepackage{pgfplots}\pgfdeclarepatternformonly{dots-wide}% name{\pgfpointorigin}% bottom left{\pgfqpoint{6mm}{6mm}}% top right{\pgfqpoint{6mm}{6mm}}% tile size{% code    \pgfpathcircle{\pgfpoint{0.3mm}{0.3mm}}{0.3mm} \pgfusepath{fill}    \pgfusepath{fill}}\begin{document}\begin{tikzpicture}[spy using outlines={circle, magnification=10, connect spies, transform shape}]    \draw[pattern=dots-wide] (0,0) rectangle (3,3);    \spy[size=5cm] on (2,2) in node at (8,2);\end{tikzpicture}\end{document}

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images