How to add a white background to an angle label in Tikz?











up vote
5
down vote

favorite












I'm drawing a diagram for a project, but with the n vector going through the angle label it isn't very clear, I'd like to add a white background to the alpha label so it's easier to see. Thanks, see MWE below.



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{calc,patterns,angles,quotes,arrows}

begin{document}
begin{figure}
begin{center}
begin{tikzpicture}
%Define coordinates
coordinate (origin) at (0,0);
coordinate (bhat) at (0,5);
coordinate (zetahat) at (5,0);
coordinate (vector) at (3,4);
coordinate (normal) at (1.581,4.743);

%Draw axes
draw[thick, <->] (bhat) node[above]{$hat{b}$} -- (origin) -- (zetahat) node[right]{$hat{zeta}$};

%Draw vector
draw[thick, ->, blue] (origin) -- (vector) node[above]{$vec{v_r}$};

%N vector
draw[thick, dotted, ->] (origin) -- (normal) node[above]{$hat{n}$};

%Draw angle
pic [draw, "$alpha$", angle eccentricity = 1.2, angle radius = 1.5cm, thick] {angle = vector--origin--bhat};

end{tikzpicture}
caption{Pitch angle $alpha$ is equal to $2theta_{bn}$, showing specular reflection}
label{fig:Pitch Angle}
end{center}
end{figure}
end{document}









share|improve this question


















  • 1




    fill=white but I think this will also fill other parts that you don't want to fill. If that is the case you'd have to create the label separately or someone else has a smarter idea about that
    – Raven
    Dec 13 at 13:31















up vote
5
down vote

favorite












I'm drawing a diagram for a project, but with the n vector going through the angle label it isn't very clear, I'd like to add a white background to the alpha label so it's easier to see. Thanks, see MWE below.



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{calc,patterns,angles,quotes,arrows}

begin{document}
begin{figure}
begin{center}
begin{tikzpicture}
%Define coordinates
coordinate (origin) at (0,0);
coordinate (bhat) at (0,5);
coordinate (zetahat) at (5,0);
coordinate (vector) at (3,4);
coordinate (normal) at (1.581,4.743);

%Draw axes
draw[thick, <->] (bhat) node[above]{$hat{b}$} -- (origin) -- (zetahat) node[right]{$hat{zeta}$};

%Draw vector
draw[thick, ->, blue] (origin) -- (vector) node[above]{$vec{v_r}$};

%N vector
draw[thick, dotted, ->] (origin) -- (normal) node[above]{$hat{n}$};

%Draw angle
pic [draw, "$alpha$", angle eccentricity = 1.2, angle radius = 1.5cm, thick] {angle = vector--origin--bhat};

end{tikzpicture}
caption{Pitch angle $alpha$ is equal to $2theta_{bn}$, showing specular reflection}
label{fig:Pitch Angle}
end{center}
end{figure}
end{document}









share|improve this question


















  • 1




    fill=white but I think this will also fill other parts that you don't want to fill. If that is the case you'd have to create the label separately or someone else has a smarter idea about that
    – Raven
    Dec 13 at 13:31













up vote
5
down vote

favorite









up vote
5
down vote

favorite











I'm drawing a diagram for a project, but with the n vector going through the angle label it isn't very clear, I'd like to add a white background to the alpha label so it's easier to see. Thanks, see MWE below.



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{calc,patterns,angles,quotes,arrows}

begin{document}
begin{figure}
begin{center}
begin{tikzpicture}
%Define coordinates
coordinate (origin) at (0,0);
coordinate (bhat) at (0,5);
coordinate (zetahat) at (5,0);
coordinate (vector) at (3,4);
coordinate (normal) at (1.581,4.743);

%Draw axes
draw[thick, <->] (bhat) node[above]{$hat{b}$} -- (origin) -- (zetahat) node[right]{$hat{zeta}$};

%Draw vector
draw[thick, ->, blue] (origin) -- (vector) node[above]{$vec{v_r}$};

%N vector
draw[thick, dotted, ->] (origin) -- (normal) node[above]{$hat{n}$};

%Draw angle
pic [draw, "$alpha$", angle eccentricity = 1.2, angle radius = 1.5cm, thick] {angle = vector--origin--bhat};

end{tikzpicture}
caption{Pitch angle $alpha$ is equal to $2theta_{bn}$, showing specular reflection}
label{fig:Pitch Angle}
end{center}
end{figure}
end{document}









share|improve this question













I'm drawing a diagram for a project, but with the n vector going through the angle label it isn't very clear, I'd like to add a white background to the alpha label so it's easier to see. Thanks, see MWE below.



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{calc,patterns,angles,quotes,arrows}

begin{document}
begin{figure}
begin{center}
begin{tikzpicture}
%Define coordinates
coordinate (origin) at (0,0);
coordinate (bhat) at (0,5);
coordinate (zetahat) at (5,0);
coordinate (vector) at (3,4);
coordinate (normal) at (1.581,4.743);

%Draw axes
draw[thick, <->] (bhat) node[above]{$hat{b}$} -- (origin) -- (zetahat) node[right]{$hat{zeta}$};

%Draw vector
draw[thick, ->, blue] (origin) -- (vector) node[above]{$vec{v_r}$};

%N vector
draw[thick, dotted, ->] (origin) -- (normal) node[above]{$hat{n}$};

%Draw angle
pic [draw, "$alpha$", angle eccentricity = 1.2, angle radius = 1.5cm, thick] {angle = vector--origin--bhat};

end{tikzpicture}
caption{Pitch angle $alpha$ is equal to $2theta_{bn}$, showing specular reflection}
label{fig:Pitch Angle}
end{center}
end{figure}
end{document}






tikz-node tikz-angles






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 13 at 13:10









Jasper Salisbury

355




355








  • 1




    fill=white but I think this will also fill other parts that you don't want to fill. If that is the case you'd have to create the label separately or someone else has a smarter idea about that
    – Raven
    Dec 13 at 13:31














  • 1




    fill=white but I think this will also fill other parts that you don't want to fill. If that is the case you'd have to create the label separately or someone else has a smarter idea about that
    – Raven
    Dec 13 at 13:31








1




1




fill=white but I think this will also fill other parts that you don't want to fill. If that is the case you'd have to create the label separately or someone else has a smarter idea about that
– Raven
Dec 13 at 13:31




fill=white but I think this will also fill other parts that you don't want to fill. If that is the case you'd have to create the label separately or someone else has a smarter idea about that
– Raven
Dec 13 at 13:31










2 Answers
2






active

oldest

votes

















up vote
6
down vote



accepted










Use "$alpha$"{fill=white} instead of "$alpha$" in pic



enter image description here



documentclass{article}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{tikz}
usetikzlibrary{calc,patterns,angles,quotes,arrows}

begin{document}
begin{figure}
begin{center}
begin{tikzpicture}
%Define coordinates
coordinate (origin) at (0,0);
coordinate (bhat) at (0,5);
coordinate (zetahat) at (5,0);
coordinate (vector) at (3,4);
coordinate (normal) at (1.581,4.743);

%Draw axes
draw[thick, <->] (bhat) node[above]{$hat{b}$} -- (origin) -- (zetahat) node[right]{$hat{zeta}$};

%Draw vector
draw[thick, ->, blue] (origin) -- (vector) node[above]{$vec{v_r}$};

%N vector
draw[thick, dotted, ->] (origin) -- (normal) node[above]{$hat{n}$};

%Draw angle
pic [draw, "$alpha$"{fill=white}, angle eccentricity = 1.2, angle radius = 1.5cm, thick] {angle = vector--origin--bhat};

end{tikzpicture}
caption{Pitch angle $alpha$ is equal to $2theta_{bn}$, showing specular reflection}
label{fig:Pitch Angle}
end{center}
end{figure}
end{document}





share|improve this answer





















  • Perfect! I knew there would be a simple answer!
    – Jasper Salisbury
    Dec 13 at 13:38


















up vote
2
down vote













A PSTricks solution only for comparison purposes. A single * does the job (making the label background solid).



documentclass[pstricks,12pt]{standalone}
begin{document}
pspicture(-1,-1)(6,6)
psline{<->}(0,5)(0,0)(5,0)
psline{->}(5;60)
psline[linestyle=dotted,dotsep=1pt]{->}(5;75)
uput[90](0,5){$hat{b}$}
uput[0](5,0){$hat{zeta}$}
uput[60](5;60){$vec{v}_r$}
uput[75](5;75){$hat{n}$}
uput*{2.5}[75](0,0){$alpha$}
psarc(0,0){2}{60}{90}
endpspicture
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
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f464699%2fhow-to-add-a-white-background-to-an-angle-label-in-tikz%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








    up vote
    6
    down vote



    accepted










    Use "$alpha$"{fill=white} instead of "$alpha$" in pic



    enter image description here



    documentclass{article}
    usepackage[utf8]{inputenc}
    usepackage{amsmath}
    usepackage{tikz}
    usetikzlibrary{calc,patterns,angles,quotes,arrows}

    begin{document}
    begin{figure}
    begin{center}
    begin{tikzpicture}
    %Define coordinates
    coordinate (origin) at (0,0);
    coordinate (bhat) at (0,5);
    coordinate (zetahat) at (5,0);
    coordinate (vector) at (3,4);
    coordinate (normal) at (1.581,4.743);

    %Draw axes
    draw[thick, <->] (bhat) node[above]{$hat{b}$} -- (origin) -- (zetahat) node[right]{$hat{zeta}$};

    %Draw vector
    draw[thick, ->, blue] (origin) -- (vector) node[above]{$vec{v_r}$};

    %N vector
    draw[thick, dotted, ->] (origin) -- (normal) node[above]{$hat{n}$};

    %Draw angle
    pic [draw, "$alpha$"{fill=white}, angle eccentricity = 1.2, angle radius = 1.5cm, thick] {angle = vector--origin--bhat};

    end{tikzpicture}
    caption{Pitch angle $alpha$ is equal to $2theta_{bn}$, showing specular reflection}
    label{fig:Pitch Angle}
    end{center}
    end{figure}
    end{document}





    share|improve this answer





















    • Perfect! I knew there would be a simple answer!
      – Jasper Salisbury
      Dec 13 at 13:38















    up vote
    6
    down vote



    accepted










    Use "$alpha$"{fill=white} instead of "$alpha$" in pic



    enter image description here



    documentclass{article}
    usepackage[utf8]{inputenc}
    usepackage{amsmath}
    usepackage{tikz}
    usetikzlibrary{calc,patterns,angles,quotes,arrows}

    begin{document}
    begin{figure}
    begin{center}
    begin{tikzpicture}
    %Define coordinates
    coordinate (origin) at (0,0);
    coordinate (bhat) at (0,5);
    coordinate (zetahat) at (5,0);
    coordinate (vector) at (3,4);
    coordinate (normal) at (1.581,4.743);

    %Draw axes
    draw[thick, <->] (bhat) node[above]{$hat{b}$} -- (origin) -- (zetahat) node[right]{$hat{zeta}$};

    %Draw vector
    draw[thick, ->, blue] (origin) -- (vector) node[above]{$vec{v_r}$};

    %N vector
    draw[thick, dotted, ->] (origin) -- (normal) node[above]{$hat{n}$};

    %Draw angle
    pic [draw, "$alpha$"{fill=white}, angle eccentricity = 1.2, angle radius = 1.5cm, thick] {angle = vector--origin--bhat};

    end{tikzpicture}
    caption{Pitch angle $alpha$ is equal to $2theta_{bn}$, showing specular reflection}
    label{fig:Pitch Angle}
    end{center}
    end{figure}
    end{document}





    share|improve this answer





















    • Perfect! I knew there would be a simple answer!
      – Jasper Salisbury
      Dec 13 at 13:38













    up vote
    6
    down vote



    accepted







    up vote
    6
    down vote



    accepted






    Use "$alpha$"{fill=white} instead of "$alpha$" in pic



    enter image description here



    documentclass{article}
    usepackage[utf8]{inputenc}
    usepackage{amsmath}
    usepackage{tikz}
    usetikzlibrary{calc,patterns,angles,quotes,arrows}

    begin{document}
    begin{figure}
    begin{center}
    begin{tikzpicture}
    %Define coordinates
    coordinate (origin) at (0,0);
    coordinate (bhat) at (0,5);
    coordinate (zetahat) at (5,0);
    coordinate (vector) at (3,4);
    coordinate (normal) at (1.581,4.743);

    %Draw axes
    draw[thick, <->] (bhat) node[above]{$hat{b}$} -- (origin) -- (zetahat) node[right]{$hat{zeta}$};

    %Draw vector
    draw[thick, ->, blue] (origin) -- (vector) node[above]{$vec{v_r}$};

    %N vector
    draw[thick, dotted, ->] (origin) -- (normal) node[above]{$hat{n}$};

    %Draw angle
    pic [draw, "$alpha$"{fill=white}, angle eccentricity = 1.2, angle radius = 1.5cm, thick] {angle = vector--origin--bhat};

    end{tikzpicture}
    caption{Pitch angle $alpha$ is equal to $2theta_{bn}$, showing specular reflection}
    label{fig:Pitch Angle}
    end{center}
    end{figure}
    end{document}





    share|improve this answer












    Use "$alpha$"{fill=white} instead of "$alpha$" in pic



    enter image description here



    documentclass{article}
    usepackage[utf8]{inputenc}
    usepackage{amsmath}
    usepackage{tikz}
    usetikzlibrary{calc,patterns,angles,quotes,arrows}

    begin{document}
    begin{figure}
    begin{center}
    begin{tikzpicture}
    %Define coordinates
    coordinate (origin) at (0,0);
    coordinate (bhat) at (0,5);
    coordinate (zetahat) at (5,0);
    coordinate (vector) at (3,4);
    coordinate (normal) at (1.581,4.743);

    %Draw axes
    draw[thick, <->] (bhat) node[above]{$hat{b}$} -- (origin) -- (zetahat) node[right]{$hat{zeta}$};

    %Draw vector
    draw[thick, ->, blue] (origin) -- (vector) node[above]{$vec{v_r}$};

    %N vector
    draw[thick, dotted, ->] (origin) -- (normal) node[above]{$hat{n}$};

    %Draw angle
    pic [draw, "$alpha$"{fill=white}, angle eccentricity = 1.2, angle radius = 1.5cm, thick] {angle = vector--origin--bhat};

    end{tikzpicture}
    caption{Pitch angle $alpha$ is equal to $2theta_{bn}$, showing specular reflection}
    label{fig:Pitch Angle}
    end{center}
    end{figure}
    end{document}






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Dec 13 at 13:33









    nidhin

    3,324927




    3,324927












    • Perfect! I knew there would be a simple answer!
      – Jasper Salisbury
      Dec 13 at 13:38


















    • Perfect! I knew there would be a simple answer!
      – Jasper Salisbury
      Dec 13 at 13:38
















    Perfect! I knew there would be a simple answer!
    – Jasper Salisbury
    Dec 13 at 13:38




    Perfect! I knew there would be a simple answer!
    – Jasper Salisbury
    Dec 13 at 13:38










    up vote
    2
    down vote













    A PSTricks solution only for comparison purposes. A single * does the job (making the label background solid).



    documentclass[pstricks,12pt]{standalone}
    begin{document}
    pspicture(-1,-1)(6,6)
    psline{<->}(0,5)(0,0)(5,0)
    psline{->}(5;60)
    psline[linestyle=dotted,dotsep=1pt]{->}(5;75)
    uput[90](0,5){$hat{b}$}
    uput[0](5,0){$hat{zeta}$}
    uput[60](5;60){$vec{v}_r$}
    uput[75](5;75){$hat{n}$}
    uput*{2.5}[75](0,0){$alpha$}
    psarc(0,0){2}{60}{90}
    endpspicture
    end{document}


    enter image description here






    share|improve this answer

























      up vote
      2
      down vote













      A PSTricks solution only for comparison purposes. A single * does the job (making the label background solid).



      documentclass[pstricks,12pt]{standalone}
      begin{document}
      pspicture(-1,-1)(6,6)
      psline{<->}(0,5)(0,0)(5,0)
      psline{->}(5;60)
      psline[linestyle=dotted,dotsep=1pt]{->}(5;75)
      uput[90](0,5){$hat{b}$}
      uput[0](5,0){$hat{zeta}$}
      uput[60](5;60){$vec{v}_r$}
      uput[75](5;75){$hat{n}$}
      uput*{2.5}[75](0,0){$alpha$}
      psarc(0,0){2}{60}{90}
      endpspicture
      end{document}


      enter image description here






      share|improve this answer























        up vote
        2
        down vote










        up vote
        2
        down vote









        A PSTricks solution only for comparison purposes. A single * does the job (making the label background solid).



        documentclass[pstricks,12pt]{standalone}
        begin{document}
        pspicture(-1,-1)(6,6)
        psline{<->}(0,5)(0,0)(5,0)
        psline{->}(5;60)
        psline[linestyle=dotted,dotsep=1pt]{->}(5;75)
        uput[90](0,5){$hat{b}$}
        uput[0](5,0){$hat{zeta}$}
        uput[60](5;60){$vec{v}_r$}
        uput[75](5;75){$hat{n}$}
        uput*{2.5}[75](0,0){$alpha$}
        psarc(0,0){2}{60}{90}
        endpspicture
        end{document}


        enter image description here






        share|improve this answer












        A PSTricks solution only for comparison purposes. A single * does the job (making the label background solid).



        documentclass[pstricks,12pt]{standalone}
        begin{document}
        pspicture(-1,-1)(6,6)
        psline{<->}(0,5)(0,0)(5,0)
        psline{->}(5;60)
        psline[linestyle=dotted,dotsep=1pt]{->}(5;75)
        uput[90](0,5){$hat{b}$}
        uput[0](5,0){$hat{zeta}$}
        uput[60](5;60){$vec{v}_r$}
        uput[75](5;75){$hat{n}$}
        uput*{2.5}[75](0,0){$alpha$}
        psarc(0,0){2}{60}{90}
        endpspicture
        end{document}


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 13 at 14:40









        Artificial Stupidity

        5,26511039




        5,26511039






























            draft saved

            draft discarded




















































            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2f464699%2fhow-to-add-a-white-background-to-an-angle-label-in-tikz%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

            How did Captain America manage to do this?

            迪纳利

            南乌拉尔铁路局