Hello I am trying to create a figure with tikz. Im using patterns to define a few different regions.
zone 0 is gray
zone 1 is north east lines
z2 is north west lines
For some reason the diagonal patterns are coming out dashed. And Im not sure why.
Does anyone know how to fix this?
Below is my code and a screen shot:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{patterns}
\usepackage{tkz-euclide}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\tkzInit[xmax=5,ymax=5]
%\tkzAxeXY
%zone 2 (rectangle, negative)
\fill[pattern=north west lines] (0,5) rectangle (5.5,0);
%circle mask
\fill[white] (4,1.5) circle (1.35);
%zone 1
\node[minimum width=2.7cm,
circle,inner sep=0pt,fill opacity=1,
line width=2.5mm,pattern=north east lines,opacity=1] at (4,1.5){};
%zone 0 (positive)
\node[minimum width=2cm,
circle,inner sep=0pt,fill opacity=1,
line width=2.5mm,draw=gray,opacity=1] at (4,1.5){};
%wall (dashed line)
\node[minimum width=2cm,
circle,inner sep=0pt,fill opacity=0,
line width=.5mm,dashed,draw=black,opacity=1] at (4,1.5){};
\end{tikzpicture}
\end{document}
Best Answer
I think this is a renderer-side problem. For the code at the end, the left one is the screenshot and the right one is the exported PNG.
Here are some code/comment from
pgfcorepatterns.code.tex
;and code from
pgflibrarypatterns.code.tex
.So I think this is what happened
and what I did
south east version
For your convenience, here is a south east version