Hatch with ShadingCustom and built in TikZ fill patternsHatched rectangle with color gradientstripe pattern...

Is it possible to have 2 different but equal size real number sets that have the same mean and standard deviation?

Why is long-term living in Almost-Earth causing severe health problems?

Why is Na5 not played in this line of the French Defense, Advance Variation?

As easy as Three, Two, One... How fast can you go from Five to Four?

Hatch with Shading

bash vs. zsh: What are the practical differences?

Does putting salt first make it easier for attacker to bruteforce the hash?

Can there be absolute velocity?

How to create a cubic equation that include sums of the roots of another cubic equation

Why is the length of the Kelvin unit of temperature equal to that of the Celsius unit?

If there's something that implicates the president why is there then a national security issue? (John Dowd)

Why ambiguous grammars are bad?

Trying to get (more) accurate readings from thermistor (electronics, math, and code inside)

Is it a acceptable way to write a loss function in this form?

How to destroy a galactic level civilization and still leave behind primitive survivors?

If I had a daughter who (is/were/was) cute, I would be very happy

Tikz-cd diagram arrow passing under a node - not crossing it

Is there a DSLR/mirorless camera with minimal options like a classic, simple SLR?

Why did Intel abandon unified CPU cache?

Why isn't Bash trap working if output is redirected to stdout?

What is the Leave No Trace way to dispose of coffee grounds?

Why are MBA programs closing in the United States?

Is Lambda Calculus purely syntactic?

To what extent do precedents in Westminster systems apply in other countries that use it?



Hatch with Shading


Custom and built in TikZ fill patternsHatched rectangle with color gradientstripe pattern tikz manual chapter 78Rotate a node but not its content: the case of the ellipse decorationHatch a rectangle in TikZHow to define the default vertical distance between nodes?Numerical conditional within tikz keys?Why do I get an extra white page before my TikZ picture?TikZ&Titlesec: complicated part designCustom Fading for RectangleLine up nested tikz enviroments or how to get rid of themHow is a PGF shading applied?













2















I would like to have a rectangle that has some hatch. Furthermore, the hatch should have some shading. But, I am only able to get a transition of the colors in the background. Does anyone know how to only have a color gradient in the hatch with only a white background?



Thanks a lot.



documentclass{standalone}
usepackage{tikz}
usetikzlibrary{patterns}
begin{document}
begin{tikzpicture}
fill[left color=blue!40, right color=white, postaction={pattern=north west lines, pattern color=blue!40}] (0,0) rectangle (3,3);
end{tikzpicture}
end{document}









share|improve this question









New contributor



Sir Sy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 1





    Maybe help: tex.stackexchange.com/a/393131/31034

    – ferahfeza
    7 hours ago











  • Thank you. I have found this as well. But was not able to adapt it to a north west pattern and defining the dimensions in the tikz environment...

    – Sir Sy
    7 hours ago
















2















I would like to have a rectangle that has some hatch. Furthermore, the hatch should have some shading. But, I am only able to get a transition of the colors in the background. Does anyone know how to only have a color gradient in the hatch with only a white background?



Thanks a lot.



documentclass{standalone}
usepackage{tikz}
usetikzlibrary{patterns}
begin{document}
begin{tikzpicture}
fill[left color=blue!40, right color=white, postaction={pattern=north west lines, pattern color=blue!40}] (0,0) rectangle (3,3);
end{tikzpicture}
end{document}









share|improve this question









New contributor



Sir Sy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 1





    Maybe help: tex.stackexchange.com/a/393131/31034

    – ferahfeza
    7 hours ago











  • Thank you. I have found this as well. But was not able to adapt it to a north west pattern and defining the dimensions in the tikz environment...

    – Sir Sy
    7 hours ago














2












2








2








I would like to have a rectangle that has some hatch. Furthermore, the hatch should have some shading. But, I am only able to get a transition of the colors in the background. Does anyone know how to only have a color gradient in the hatch with only a white background?



Thanks a lot.



documentclass{standalone}
usepackage{tikz}
usetikzlibrary{patterns}
begin{document}
begin{tikzpicture}
fill[left color=blue!40, right color=white, postaction={pattern=north west lines, pattern color=blue!40}] (0,0) rectangle (3,3);
end{tikzpicture}
end{document}









share|improve this question









New contributor



Sir Sy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I would like to have a rectangle that has some hatch. Furthermore, the hatch should have some shading. But, I am only able to get a transition of the colors in the background. Does anyone know how to only have a color gradient in the hatch with only a white background?



Thanks a lot.



documentclass{standalone}
usepackage{tikz}
usetikzlibrary{patterns}
begin{document}
begin{tikzpicture}
fill[left color=blue!40, right color=white, postaction={pattern=north west lines, pattern color=blue!40}] (0,0) rectangle (3,3);
end{tikzpicture}
end{document}






tikz-pgf color gradient






share|improve this question









New contributor



Sir Sy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



Sir Sy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 8 hours ago









jGaboardi

392313




392313






New contributor



Sir Sy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 8 hours ago









Sir SySir Sy

1134




1134




New contributor



Sir Sy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




Sir Sy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










  • 1





    Maybe help: tex.stackexchange.com/a/393131/31034

    – ferahfeza
    7 hours ago











  • Thank you. I have found this as well. But was not able to adapt it to a north west pattern and defining the dimensions in the tikz environment...

    – Sir Sy
    7 hours ago














  • 1





    Maybe help: tex.stackexchange.com/a/393131/31034

    – ferahfeza
    7 hours ago











  • Thank you. I have found this as well. But was not able to adapt it to a north west pattern and defining the dimensions in the tikz environment...

    – Sir Sy
    7 hours ago








1




1





Maybe help: tex.stackexchange.com/a/393131/31034

– ferahfeza
7 hours ago





Maybe help: tex.stackexchange.com/a/393131/31034

– ferahfeza
7 hours ago













Thank you. I have found this as well. But was not able to adapt it to a north west pattern and defining the dimensions in the tikz environment...

– Sir Sy
7 hours ago





Thank you. I have found this as well. But was not able to adapt it to a north west pattern and defining the dimensions in the tikz environment...

– Sir Sy
7 hours ago










2 Answers
2






active

oldest

votes


















2














This is conceptually the same as Ignasi's nice answer in that the pattern is in the background color, so it determines what should be left unshaded. And in order to customize the pattern I use this answer. And of course you need to dial a shading angle to make the shading follow the north east lines.



documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{patterns}
% defining the new dimensions and parameters
newlength{hatchspread}
newlength{hatchthickness}
newlength{hatchshift}
newcommand{hatchcolor}{}
% declaring the keys in tikz
tikzset{hatchspread/.code={setlength{hatchspread}{#1}},
hatchthickness/.code={setlength{hatchthickness}{#1}},
hatchshift/.code={setlength{hatchshift}{#1}},% must be >= 0
hatchcolor/.code={renewcommand{hatchcolor}{#1}}}
% setting the default values
tikzset{hatchspread=3pt,
hatchthickness=0.4pt,
hatchshift=0pt,% must be >= 0
hatchcolor=black}
% declaring the pattern
pgfdeclarepatternformonly[hatchspread,hatchthickness,hatchshift,hatchcolor]% variables
{custom north west lines}% name
{pgfqpoint{dimexpr-2hatchthickness}{dimexpr-2hatchthickness}}% lower left corner
{pgfqpoint{dimexprhatchspread+2hatchthickness}{dimexprhatchspread+2hatchthickness}}% upper right corner
{pgfqpoint{dimexprhatchspread}{dimexprhatchspread}}% tile size
{% shape description
pgfsetlinewidth{hatchthickness}
pgfpathmoveto{pgfqpoint{-1.5hatchthickness}{dimexpr1.5hatchthickness+hatchspread+hatchshift}}
pgfpathlineto{pgfqpoint{dimexprhatchspread+1pt+hatchshift}{-1pt}}
ifdim hatchshift > 0pt
pgfpathmoveto{pgfqpoint{0pt}{hatchshift}}
pgfpathlineto{pgfqpoint{dimexpr1pt+hatchshift}{-1pt}}
fi
pgfsetstrokecolor{hatchcolor}
pgfusepath{stroke}
}

begin{document}
begin{tikzpicture}
fill[left color=blue!40, right color=white,shading angle=45,line width=2pt,
postaction={pattern=custom north west lines,
hatchthickness=1pt,hatchcolor=white}] (0,0) rectangle (3,3);
end{tikzpicture}
end{document}


enter image description here






share|improve this answer


























  • I think the lines should extend beyond the bounds of the shape.

    – azetina
    6 hours ago











  • @azetina There are always viewer issues with these patterns. In order to address your comment I (i) changed the code slightly and (ii) took the screen shot from acroread.

    – marmot
    5 hours ago



















2














Only for fun!



documentclass[border=3mm]{standalone}
usepackage{tikz}
begin{document}

begin{tikzpicture}
defa{3}
deflw{0.2}
draw[blue, thick] (0,0) rectangle (a,a);
foreach x [count=i] in{0,0.1,0.2,...,a}{
draw [blue,line width=lw mm,opacity=i/45](x,0)--(0,x) (a,a-x)--(a-x,a);}
end{tikzpicture}

end{document}


enter image description here






share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });






    Sir Sy is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f494984%2fhatch-with-shading%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    This is conceptually the same as Ignasi's nice answer in that the pattern is in the background color, so it determines what should be left unshaded. And in order to customize the pattern I use this answer. And of course you need to dial a shading angle to make the shading follow the north east lines.



    documentclass[tikz,border=3.14mm]{standalone}
    usetikzlibrary{patterns}
    % defining the new dimensions and parameters
    newlength{hatchspread}
    newlength{hatchthickness}
    newlength{hatchshift}
    newcommand{hatchcolor}{}
    % declaring the keys in tikz
    tikzset{hatchspread/.code={setlength{hatchspread}{#1}},
    hatchthickness/.code={setlength{hatchthickness}{#1}},
    hatchshift/.code={setlength{hatchshift}{#1}},% must be >= 0
    hatchcolor/.code={renewcommand{hatchcolor}{#1}}}
    % setting the default values
    tikzset{hatchspread=3pt,
    hatchthickness=0.4pt,
    hatchshift=0pt,% must be >= 0
    hatchcolor=black}
    % declaring the pattern
    pgfdeclarepatternformonly[hatchspread,hatchthickness,hatchshift,hatchcolor]% variables
    {custom north west lines}% name
    {pgfqpoint{dimexpr-2hatchthickness}{dimexpr-2hatchthickness}}% lower left corner
    {pgfqpoint{dimexprhatchspread+2hatchthickness}{dimexprhatchspread+2hatchthickness}}% upper right corner
    {pgfqpoint{dimexprhatchspread}{dimexprhatchspread}}% tile size
    {% shape description
    pgfsetlinewidth{hatchthickness}
    pgfpathmoveto{pgfqpoint{-1.5hatchthickness}{dimexpr1.5hatchthickness+hatchspread+hatchshift}}
    pgfpathlineto{pgfqpoint{dimexprhatchspread+1pt+hatchshift}{-1pt}}
    ifdim hatchshift > 0pt
    pgfpathmoveto{pgfqpoint{0pt}{hatchshift}}
    pgfpathlineto{pgfqpoint{dimexpr1pt+hatchshift}{-1pt}}
    fi
    pgfsetstrokecolor{hatchcolor}
    pgfusepath{stroke}
    }

    begin{document}
    begin{tikzpicture}
    fill[left color=blue!40, right color=white,shading angle=45,line width=2pt,
    postaction={pattern=custom north west lines,
    hatchthickness=1pt,hatchcolor=white}] (0,0) rectangle (3,3);
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer


























    • I think the lines should extend beyond the bounds of the shape.

      – azetina
      6 hours ago











    • @azetina There are always viewer issues with these patterns. In order to address your comment I (i) changed the code slightly and (ii) took the screen shot from acroread.

      – marmot
      5 hours ago
















    2














    This is conceptually the same as Ignasi's nice answer in that the pattern is in the background color, so it determines what should be left unshaded. And in order to customize the pattern I use this answer. And of course you need to dial a shading angle to make the shading follow the north east lines.



    documentclass[tikz,border=3.14mm]{standalone}
    usetikzlibrary{patterns}
    % defining the new dimensions and parameters
    newlength{hatchspread}
    newlength{hatchthickness}
    newlength{hatchshift}
    newcommand{hatchcolor}{}
    % declaring the keys in tikz
    tikzset{hatchspread/.code={setlength{hatchspread}{#1}},
    hatchthickness/.code={setlength{hatchthickness}{#1}},
    hatchshift/.code={setlength{hatchshift}{#1}},% must be >= 0
    hatchcolor/.code={renewcommand{hatchcolor}{#1}}}
    % setting the default values
    tikzset{hatchspread=3pt,
    hatchthickness=0.4pt,
    hatchshift=0pt,% must be >= 0
    hatchcolor=black}
    % declaring the pattern
    pgfdeclarepatternformonly[hatchspread,hatchthickness,hatchshift,hatchcolor]% variables
    {custom north west lines}% name
    {pgfqpoint{dimexpr-2hatchthickness}{dimexpr-2hatchthickness}}% lower left corner
    {pgfqpoint{dimexprhatchspread+2hatchthickness}{dimexprhatchspread+2hatchthickness}}% upper right corner
    {pgfqpoint{dimexprhatchspread}{dimexprhatchspread}}% tile size
    {% shape description
    pgfsetlinewidth{hatchthickness}
    pgfpathmoveto{pgfqpoint{-1.5hatchthickness}{dimexpr1.5hatchthickness+hatchspread+hatchshift}}
    pgfpathlineto{pgfqpoint{dimexprhatchspread+1pt+hatchshift}{-1pt}}
    ifdim hatchshift > 0pt
    pgfpathmoveto{pgfqpoint{0pt}{hatchshift}}
    pgfpathlineto{pgfqpoint{dimexpr1pt+hatchshift}{-1pt}}
    fi
    pgfsetstrokecolor{hatchcolor}
    pgfusepath{stroke}
    }

    begin{document}
    begin{tikzpicture}
    fill[left color=blue!40, right color=white,shading angle=45,line width=2pt,
    postaction={pattern=custom north west lines,
    hatchthickness=1pt,hatchcolor=white}] (0,0) rectangle (3,3);
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer


























    • I think the lines should extend beyond the bounds of the shape.

      – azetina
      6 hours ago











    • @azetina There are always viewer issues with these patterns. In order to address your comment I (i) changed the code slightly and (ii) took the screen shot from acroread.

      – marmot
      5 hours ago














    2












    2








    2







    This is conceptually the same as Ignasi's nice answer in that the pattern is in the background color, so it determines what should be left unshaded. And in order to customize the pattern I use this answer. And of course you need to dial a shading angle to make the shading follow the north east lines.



    documentclass[tikz,border=3.14mm]{standalone}
    usetikzlibrary{patterns}
    % defining the new dimensions and parameters
    newlength{hatchspread}
    newlength{hatchthickness}
    newlength{hatchshift}
    newcommand{hatchcolor}{}
    % declaring the keys in tikz
    tikzset{hatchspread/.code={setlength{hatchspread}{#1}},
    hatchthickness/.code={setlength{hatchthickness}{#1}},
    hatchshift/.code={setlength{hatchshift}{#1}},% must be >= 0
    hatchcolor/.code={renewcommand{hatchcolor}{#1}}}
    % setting the default values
    tikzset{hatchspread=3pt,
    hatchthickness=0.4pt,
    hatchshift=0pt,% must be >= 0
    hatchcolor=black}
    % declaring the pattern
    pgfdeclarepatternformonly[hatchspread,hatchthickness,hatchshift,hatchcolor]% variables
    {custom north west lines}% name
    {pgfqpoint{dimexpr-2hatchthickness}{dimexpr-2hatchthickness}}% lower left corner
    {pgfqpoint{dimexprhatchspread+2hatchthickness}{dimexprhatchspread+2hatchthickness}}% upper right corner
    {pgfqpoint{dimexprhatchspread}{dimexprhatchspread}}% tile size
    {% shape description
    pgfsetlinewidth{hatchthickness}
    pgfpathmoveto{pgfqpoint{-1.5hatchthickness}{dimexpr1.5hatchthickness+hatchspread+hatchshift}}
    pgfpathlineto{pgfqpoint{dimexprhatchspread+1pt+hatchshift}{-1pt}}
    ifdim hatchshift > 0pt
    pgfpathmoveto{pgfqpoint{0pt}{hatchshift}}
    pgfpathlineto{pgfqpoint{dimexpr1pt+hatchshift}{-1pt}}
    fi
    pgfsetstrokecolor{hatchcolor}
    pgfusepath{stroke}
    }

    begin{document}
    begin{tikzpicture}
    fill[left color=blue!40, right color=white,shading angle=45,line width=2pt,
    postaction={pattern=custom north west lines,
    hatchthickness=1pt,hatchcolor=white}] (0,0) rectangle (3,3);
    end{tikzpicture}
    end{document}


    enter image description here






    share|improve this answer















    This is conceptually the same as Ignasi's nice answer in that the pattern is in the background color, so it determines what should be left unshaded. And in order to customize the pattern I use this answer. And of course you need to dial a shading angle to make the shading follow the north east lines.



    documentclass[tikz,border=3.14mm]{standalone}
    usetikzlibrary{patterns}
    % defining the new dimensions and parameters
    newlength{hatchspread}
    newlength{hatchthickness}
    newlength{hatchshift}
    newcommand{hatchcolor}{}
    % declaring the keys in tikz
    tikzset{hatchspread/.code={setlength{hatchspread}{#1}},
    hatchthickness/.code={setlength{hatchthickness}{#1}},
    hatchshift/.code={setlength{hatchshift}{#1}},% must be >= 0
    hatchcolor/.code={renewcommand{hatchcolor}{#1}}}
    % setting the default values
    tikzset{hatchspread=3pt,
    hatchthickness=0.4pt,
    hatchshift=0pt,% must be >= 0
    hatchcolor=black}
    % declaring the pattern
    pgfdeclarepatternformonly[hatchspread,hatchthickness,hatchshift,hatchcolor]% variables
    {custom north west lines}% name
    {pgfqpoint{dimexpr-2hatchthickness}{dimexpr-2hatchthickness}}% lower left corner
    {pgfqpoint{dimexprhatchspread+2hatchthickness}{dimexprhatchspread+2hatchthickness}}% upper right corner
    {pgfqpoint{dimexprhatchspread}{dimexprhatchspread}}% tile size
    {% shape description
    pgfsetlinewidth{hatchthickness}
    pgfpathmoveto{pgfqpoint{-1.5hatchthickness}{dimexpr1.5hatchthickness+hatchspread+hatchshift}}
    pgfpathlineto{pgfqpoint{dimexprhatchspread+1pt+hatchshift}{-1pt}}
    ifdim hatchshift > 0pt
    pgfpathmoveto{pgfqpoint{0pt}{hatchshift}}
    pgfpathlineto{pgfqpoint{dimexpr1pt+hatchshift}{-1pt}}
    fi
    pgfsetstrokecolor{hatchcolor}
    pgfusepath{stroke}
    }

    begin{document}
    begin{tikzpicture}
    fill[left color=blue!40, right color=white,shading angle=45,line width=2pt,
    postaction={pattern=custom north west lines,
    hatchthickness=1pt,hatchcolor=white}] (0,0) rectangle (3,3);
    end{tikzpicture}
    end{document}


    enter image description here







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 6 hours ago

























    answered 6 hours ago









    marmotmarmot

    134k6174322




    134k6174322













    • I think the lines should extend beyond the bounds of the shape.

      – azetina
      6 hours ago











    • @azetina There are always viewer issues with these patterns. In order to address your comment I (i) changed the code slightly and (ii) took the screen shot from acroread.

      – marmot
      5 hours ago



















    • I think the lines should extend beyond the bounds of the shape.

      – azetina
      6 hours ago











    • @azetina There are always viewer issues with these patterns. In order to address your comment I (i) changed the code slightly and (ii) took the screen shot from acroread.

      – marmot
      5 hours ago

















    I think the lines should extend beyond the bounds of the shape.

    – azetina
    6 hours ago





    I think the lines should extend beyond the bounds of the shape.

    – azetina
    6 hours ago













    @azetina There are always viewer issues with these patterns. In order to address your comment I (i) changed the code slightly and (ii) took the screen shot from acroread.

    – marmot
    5 hours ago





    @azetina There are always viewer issues with these patterns. In order to address your comment I (i) changed the code slightly and (ii) took the screen shot from acroread.

    – marmot
    5 hours ago











    2














    Only for fun!



    documentclass[border=3mm]{standalone}
    usepackage{tikz}
    begin{document}

    begin{tikzpicture}
    defa{3}
    deflw{0.2}
    draw[blue, thick] (0,0) rectangle (a,a);
    foreach x [count=i] in{0,0.1,0.2,...,a}{
    draw [blue,line width=lw mm,opacity=i/45](x,0)--(0,x) (a,a-x)--(a-x,a);}
    end{tikzpicture}

    end{document}


    enter image description here






    share|improve this answer




























      2














      Only for fun!



      documentclass[border=3mm]{standalone}
      usepackage{tikz}
      begin{document}

      begin{tikzpicture}
      defa{3}
      deflw{0.2}
      draw[blue, thick] (0,0) rectangle (a,a);
      foreach x [count=i] in{0,0.1,0.2,...,a}{
      draw [blue,line width=lw mm,opacity=i/45](x,0)--(0,x) (a,a-x)--(a-x,a);}
      end{tikzpicture}

      end{document}


      enter image description here






      share|improve this answer


























        2












        2








        2







        Only for fun!



        documentclass[border=3mm]{standalone}
        usepackage{tikz}
        begin{document}

        begin{tikzpicture}
        defa{3}
        deflw{0.2}
        draw[blue, thick] (0,0) rectangle (a,a);
        foreach x [count=i] in{0,0.1,0.2,...,a}{
        draw [blue,line width=lw mm,opacity=i/45](x,0)--(0,x) (a,a-x)--(a-x,a);}
        end{tikzpicture}

        end{document}


        enter image description here






        share|improve this answer













        Only for fun!



        documentclass[border=3mm]{standalone}
        usepackage{tikz}
        begin{document}

        begin{tikzpicture}
        defa{3}
        deflw{0.2}
        draw[blue, thick] (0,0) rectangle (a,a);
        foreach x [count=i] in{0,0.1,0.2,...,a}{
        draw [blue,line width=lw mm,opacity=i/45](x,0)--(0,x) (a,a-x)--(a-x,a);}
        end{tikzpicture}

        end{document}


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 4 hours ago









        ferahfezaferahfeza

        8,04912134




        8,04912134






















            Sir Sy is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Sir Sy is a new contributor. Be nice, and check out our Code of Conduct.













            Sir Sy is a new contributor. Be nice, and check out our Code of Conduct.












            Sir Sy is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f494984%2fhatch-with-shading%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

            The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

            Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...