BlochSphere package : draw black axis












3















I need to draw the x,y,z axis of my bloch sphere in black (with an arrow at the end of them).



I tried this code which doesn't work (my axis are light grey).



How to fix it ? I am not sure to understand how to use the options.



documentclass{standalone}

usepackage{blochsphere}

begin{document}

begin{blochsphere}[radius=1.5 cm,tilt=15,rotation=-20]
drawBallGrid[style={opacity=0.1}]{30}{30}

drawGreatCircle[style={dashed}]{0}{0}{0}

drawAxis[style={draw=black}]{0}{0}

drawAxis[color=black]{90}{0}

labelLatLon{up}{90}{0};
labelLatLon{down}{-90}{90};
node[above] at (up) {{tiny $left|0right>$ }};
node[below] at (down) {{tiny $left|1right>$}};


end{blochsphere}
end{document}


The result : enter image description here



As you can see the lines are light grey and not black.



Important info : I never used tikz, I just read the documentation to see how it works (because apparently the BlochSphere package is based on it).



Documentation of the Bloch Sphere package : http://ctan.math.washington.edu/tex-archive/graphics/pgf/contrib/blochsphere/blochsphere.pdf










share|improve this question


















  • 3





    Your axis are black its simply that the grey shell is obscuring them (see how the black equatorial circle is also grey when seen through the translucent glob :-), this is natural with such drawings. Others will possibly guide you but some will wonder why you think they would / should be black

    – KJO
    4 hours ago











  • I should have added if you simply need black lines hovering this side of centre why not draw them across the ball ? You are NOT yet calling TikZ so perhaps use whatever graphics you already know.

    – KJO
    3 hours ago






  • 1





    There are example on this site that also draw such things, like this one and that one. (I never used the blochsphere package, so I can't tell if there is a simple way to do that with this package.)

    – marmot
    3 hours ago











  • How about drawBallGrid[style={opacity=1,ultra thin}]{30}{30}?

    – marmot
    2 hours ago











  • @marmot "that one" looks best since your amended grid looks nice like a hampster ball :-) but does not move axis to the eye (I tried changing options including3D shifting but the axes are "fixed" inside the globe (best I can do is poke black ends out of the sphere)

    – KJO
    2 hours ago
















3















I need to draw the x,y,z axis of my bloch sphere in black (with an arrow at the end of them).



I tried this code which doesn't work (my axis are light grey).



How to fix it ? I am not sure to understand how to use the options.



documentclass{standalone}

usepackage{blochsphere}

begin{document}

begin{blochsphere}[radius=1.5 cm,tilt=15,rotation=-20]
drawBallGrid[style={opacity=0.1}]{30}{30}

drawGreatCircle[style={dashed}]{0}{0}{0}

drawAxis[style={draw=black}]{0}{0}

drawAxis[color=black]{90}{0}

labelLatLon{up}{90}{0};
labelLatLon{down}{-90}{90};
node[above] at (up) {{tiny $left|0right>$ }};
node[below] at (down) {{tiny $left|1right>$}};


end{blochsphere}
end{document}


The result : enter image description here



As you can see the lines are light grey and not black.



Important info : I never used tikz, I just read the documentation to see how it works (because apparently the BlochSphere package is based on it).



Documentation of the Bloch Sphere package : http://ctan.math.washington.edu/tex-archive/graphics/pgf/contrib/blochsphere/blochsphere.pdf










share|improve this question


















  • 3





    Your axis are black its simply that the grey shell is obscuring them (see how the black equatorial circle is also grey when seen through the translucent glob :-), this is natural with such drawings. Others will possibly guide you but some will wonder why you think they would / should be black

    – KJO
    4 hours ago











  • I should have added if you simply need black lines hovering this side of centre why not draw them across the ball ? You are NOT yet calling TikZ so perhaps use whatever graphics you already know.

    – KJO
    3 hours ago






  • 1





    There are example on this site that also draw such things, like this one and that one. (I never used the blochsphere package, so I can't tell if there is a simple way to do that with this package.)

    – marmot
    3 hours ago











  • How about drawBallGrid[style={opacity=1,ultra thin}]{30}{30}?

    – marmot
    2 hours ago











  • @marmot "that one" looks best since your amended grid looks nice like a hampster ball :-) but does not move axis to the eye (I tried changing options including3D shifting but the axes are "fixed" inside the globe (best I can do is poke black ends out of the sphere)

    – KJO
    2 hours ago














3












3








3


1






I need to draw the x,y,z axis of my bloch sphere in black (with an arrow at the end of them).



I tried this code which doesn't work (my axis are light grey).



How to fix it ? I am not sure to understand how to use the options.



documentclass{standalone}

usepackage{blochsphere}

begin{document}

begin{blochsphere}[radius=1.5 cm,tilt=15,rotation=-20]
drawBallGrid[style={opacity=0.1}]{30}{30}

drawGreatCircle[style={dashed}]{0}{0}{0}

drawAxis[style={draw=black}]{0}{0}

drawAxis[color=black]{90}{0}

labelLatLon{up}{90}{0};
labelLatLon{down}{-90}{90};
node[above] at (up) {{tiny $left|0right>$ }};
node[below] at (down) {{tiny $left|1right>$}};


end{blochsphere}
end{document}


The result : enter image description here



As you can see the lines are light grey and not black.



Important info : I never used tikz, I just read the documentation to see how it works (because apparently the BlochSphere package is based on it).



Documentation of the Bloch Sphere package : http://ctan.math.washington.edu/tex-archive/graphics/pgf/contrib/blochsphere/blochsphere.pdf










share|improve this question














I need to draw the x,y,z axis of my bloch sphere in black (with an arrow at the end of them).



I tried this code which doesn't work (my axis are light grey).



How to fix it ? I am not sure to understand how to use the options.



documentclass{standalone}

usepackage{blochsphere}

begin{document}

begin{blochsphere}[radius=1.5 cm,tilt=15,rotation=-20]
drawBallGrid[style={opacity=0.1}]{30}{30}

drawGreatCircle[style={dashed}]{0}{0}{0}

drawAxis[style={draw=black}]{0}{0}

drawAxis[color=black]{90}{0}

labelLatLon{up}{90}{0};
labelLatLon{down}{-90}{90};
node[above] at (up) {{tiny $left|0right>$ }};
node[below] at (down) {{tiny $left|1right>$}};


end{blochsphere}
end{document}


The result : enter image description here



As you can see the lines are light grey and not black.



Important info : I never used tikz, I just read the documentation to see how it works (because apparently the BlochSphere package is based on it).



Documentation of the Bloch Sphere package : http://ctan.math.washington.edu/tex-archive/graphics/pgf/contrib/blochsphere/blochsphere.pdf







tikz-pgf






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 4 hours ago









StarBucKStarBucK

19115




19115








  • 3





    Your axis are black its simply that the grey shell is obscuring them (see how the black equatorial circle is also grey when seen through the translucent glob :-), this is natural with such drawings. Others will possibly guide you but some will wonder why you think they would / should be black

    – KJO
    4 hours ago











  • I should have added if you simply need black lines hovering this side of centre why not draw them across the ball ? You are NOT yet calling TikZ so perhaps use whatever graphics you already know.

    – KJO
    3 hours ago






  • 1





    There are example on this site that also draw such things, like this one and that one. (I never used the blochsphere package, so I can't tell if there is a simple way to do that with this package.)

    – marmot
    3 hours ago











  • How about drawBallGrid[style={opacity=1,ultra thin}]{30}{30}?

    – marmot
    2 hours ago











  • @marmot "that one" looks best since your amended grid looks nice like a hampster ball :-) but does not move axis to the eye (I tried changing options including3D shifting but the axes are "fixed" inside the globe (best I can do is poke black ends out of the sphere)

    – KJO
    2 hours ago














  • 3





    Your axis are black its simply that the grey shell is obscuring them (see how the black equatorial circle is also grey when seen through the translucent glob :-), this is natural with such drawings. Others will possibly guide you but some will wonder why you think they would / should be black

    – KJO
    4 hours ago











  • I should have added if you simply need black lines hovering this side of centre why not draw them across the ball ? You are NOT yet calling TikZ so perhaps use whatever graphics you already know.

    – KJO
    3 hours ago






  • 1





    There are example on this site that also draw such things, like this one and that one. (I never used the blochsphere package, so I can't tell if there is a simple way to do that with this package.)

    – marmot
    3 hours ago











  • How about drawBallGrid[style={opacity=1,ultra thin}]{30}{30}?

    – marmot
    2 hours ago











  • @marmot "that one" looks best since your amended grid looks nice like a hampster ball :-) but does not move axis to the eye (I tried changing options including3D shifting but the axes are "fixed" inside the globe (best I can do is poke black ends out of the sphere)

    – KJO
    2 hours ago








3




3





Your axis are black its simply that the grey shell is obscuring them (see how the black equatorial circle is also grey when seen through the translucent glob :-), this is natural with such drawings. Others will possibly guide you but some will wonder why you think they would / should be black

– KJO
4 hours ago





Your axis are black its simply that the grey shell is obscuring them (see how the black equatorial circle is also grey when seen through the translucent glob :-), this is natural with such drawings. Others will possibly guide you but some will wonder why you think they would / should be black

– KJO
4 hours ago













I should have added if you simply need black lines hovering this side of centre why not draw them across the ball ? You are NOT yet calling TikZ so perhaps use whatever graphics you already know.

– KJO
3 hours ago





I should have added if you simply need black lines hovering this side of centre why not draw them across the ball ? You are NOT yet calling TikZ so perhaps use whatever graphics you already know.

– KJO
3 hours ago




1




1





There are example on this site that also draw such things, like this one and that one. (I never used the blochsphere package, so I can't tell if there is a simple way to do that with this package.)

– marmot
3 hours ago





There are example on this site that also draw such things, like this one and that one. (I never used the blochsphere package, so I can't tell if there is a simple way to do that with this package.)

– marmot
3 hours ago













How about drawBallGrid[style={opacity=1,ultra thin}]{30}{30}?

– marmot
2 hours ago





How about drawBallGrid[style={opacity=1,ultra thin}]{30}{30}?

– marmot
2 hours ago













@marmot "that one" looks best since your amended grid looks nice like a hampster ball :-) but does not move axis to the eye (I tried changing options including3D shifting but the axes are "fixed" inside the globe (best I can do is poke black ends out of the sphere)

– KJO
2 hours ago





@marmot "that one" looks best since your amended grid looks nice like a hampster ball :-) but does not move axis to the eye (I tried changing options including3D shifting but the axes are "fixed" inside the globe (best I can do is poke black ends out of the sphere)

– KJO
2 hours ago










2 Answers
2






active

oldest

votes


















3














These element are either obscured by the sphere, as pointed out by KJO, or have not full opacity, which makes them look gray. So you can draw them by hand and change the opacity to arrive at



documentclass{standalone}

usepackage{blochsphere}

begin{document}

begin{blochsphere}[radius=1.5 cm,tilt=15,rotation=-20]
drawBallGrid[style={opacity=1,ultra thin}]{30}{30}

drawGreatCircle[style={dashed}]{0}{0}{0}

% drawAxis[style={draw=black}]{0}{0}
%
% drawAxis[style={color=black,opacity=1}]{90}{0}

labelLatLon{up}{90}{0};
labelLatLon{down}{-90}{90};
node[above,font=tiny] at (up) {$left|0right>$ };
node[below,font=tiny] at (down) {$left|1right>$};
labelLatLon{l}{0}{180};
labelLatLon{r}{0}{0};
draw (l) -- (r);
end{blochsphere}
end{document}


enter image description here



Whether one should draw the cross line black is a matter of taste.






share|improve this answer



















  • 1





    +1 towards ground hog day

    – KJO
    1 hour ago



















2














Encouraged by @marmot 's expert example I finally got this MWE of original request, note I had to drop ball opacity to 0.3



enter image description here



documentclass{standalone}

usepackage{blochsphere}

begin{document}

begin{blochsphere}[ball=3d,opacity=0.3]
drawBallGrid[style={opacity=1,ultra thin}]{30}{30}
drawAxis[scale=1.2]{0}{0}
drawAxis[scale=1.8]{90}{90}
drawAxis[scale=1.4]{90}{0}
labelLatLon{up}{90}{20};
labelLatLon{down}{-90}{90};
node[above,{shift=(0,0.2,0)}] at (up) {tiny N};
node[below,{shift=(0,-0.2,0)}] at (down) {tiny S};
end{blochsphere}

end{document}





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%2f470419%2fblochsphere-package-draw-black-axis%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









    3














    These element are either obscured by the sphere, as pointed out by KJO, or have not full opacity, which makes them look gray. So you can draw them by hand and change the opacity to arrive at



    documentclass{standalone}

    usepackage{blochsphere}

    begin{document}

    begin{blochsphere}[radius=1.5 cm,tilt=15,rotation=-20]
    drawBallGrid[style={opacity=1,ultra thin}]{30}{30}

    drawGreatCircle[style={dashed}]{0}{0}{0}

    % drawAxis[style={draw=black}]{0}{0}
    %
    % drawAxis[style={color=black,opacity=1}]{90}{0}

    labelLatLon{up}{90}{0};
    labelLatLon{down}{-90}{90};
    node[above,font=tiny] at (up) {$left|0right>$ };
    node[below,font=tiny] at (down) {$left|1right>$};
    labelLatLon{l}{0}{180};
    labelLatLon{r}{0}{0};
    draw (l) -- (r);
    end{blochsphere}
    end{document}


    enter image description here



    Whether one should draw the cross line black is a matter of taste.






    share|improve this answer



















    • 1





      +1 towards ground hog day

      – KJO
      1 hour ago
















    3














    These element are either obscured by the sphere, as pointed out by KJO, or have not full opacity, which makes them look gray. So you can draw them by hand and change the opacity to arrive at



    documentclass{standalone}

    usepackage{blochsphere}

    begin{document}

    begin{blochsphere}[radius=1.5 cm,tilt=15,rotation=-20]
    drawBallGrid[style={opacity=1,ultra thin}]{30}{30}

    drawGreatCircle[style={dashed}]{0}{0}{0}

    % drawAxis[style={draw=black}]{0}{0}
    %
    % drawAxis[style={color=black,opacity=1}]{90}{0}

    labelLatLon{up}{90}{0};
    labelLatLon{down}{-90}{90};
    node[above,font=tiny] at (up) {$left|0right>$ };
    node[below,font=tiny] at (down) {$left|1right>$};
    labelLatLon{l}{0}{180};
    labelLatLon{r}{0}{0};
    draw (l) -- (r);
    end{blochsphere}
    end{document}


    enter image description here



    Whether one should draw the cross line black is a matter of taste.






    share|improve this answer



















    • 1





      +1 towards ground hog day

      – KJO
      1 hour ago














    3












    3








    3







    These element are either obscured by the sphere, as pointed out by KJO, or have not full opacity, which makes them look gray. So you can draw them by hand and change the opacity to arrive at



    documentclass{standalone}

    usepackage{blochsphere}

    begin{document}

    begin{blochsphere}[radius=1.5 cm,tilt=15,rotation=-20]
    drawBallGrid[style={opacity=1,ultra thin}]{30}{30}

    drawGreatCircle[style={dashed}]{0}{0}{0}

    % drawAxis[style={draw=black}]{0}{0}
    %
    % drawAxis[style={color=black,opacity=1}]{90}{0}

    labelLatLon{up}{90}{0};
    labelLatLon{down}{-90}{90};
    node[above,font=tiny] at (up) {$left|0right>$ };
    node[below,font=tiny] at (down) {$left|1right>$};
    labelLatLon{l}{0}{180};
    labelLatLon{r}{0}{0};
    draw (l) -- (r);
    end{blochsphere}
    end{document}


    enter image description here



    Whether one should draw the cross line black is a matter of taste.






    share|improve this answer













    These element are either obscured by the sphere, as pointed out by KJO, or have not full opacity, which makes them look gray. So you can draw them by hand and change the opacity to arrive at



    documentclass{standalone}

    usepackage{blochsphere}

    begin{document}

    begin{blochsphere}[radius=1.5 cm,tilt=15,rotation=-20]
    drawBallGrid[style={opacity=1,ultra thin}]{30}{30}

    drawGreatCircle[style={dashed}]{0}{0}{0}

    % drawAxis[style={draw=black}]{0}{0}
    %
    % drawAxis[style={color=black,opacity=1}]{90}{0}

    labelLatLon{up}{90}{0};
    labelLatLon{down}{-90}{90};
    node[above,font=tiny] at (up) {$left|0right>$ };
    node[below,font=tiny] at (down) {$left|1right>$};
    labelLatLon{l}{0}{180};
    labelLatLon{r}{0}{0};
    draw (l) -- (r);
    end{blochsphere}
    end{document}


    enter image description here



    Whether one should draw the cross line black is a matter of taste.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered 1 hour ago









    marmotmarmot

    91.8k4107200




    91.8k4107200








    • 1





      +1 towards ground hog day

      – KJO
      1 hour ago














    • 1





      +1 towards ground hog day

      – KJO
      1 hour ago








    1




    1





    +1 towards ground hog day

    – KJO
    1 hour ago





    +1 towards ground hog day

    – KJO
    1 hour ago











    2














    Encouraged by @marmot 's expert example I finally got this MWE of original request, note I had to drop ball opacity to 0.3



    enter image description here



    documentclass{standalone}

    usepackage{blochsphere}

    begin{document}

    begin{blochsphere}[ball=3d,opacity=0.3]
    drawBallGrid[style={opacity=1,ultra thin}]{30}{30}
    drawAxis[scale=1.2]{0}{0}
    drawAxis[scale=1.8]{90}{90}
    drawAxis[scale=1.4]{90}{0}
    labelLatLon{up}{90}{20};
    labelLatLon{down}{-90}{90};
    node[above,{shift=(0,0.2,0)}] at (up) {tiny N};
    node[below,{shift=(0,-0.2,0)}] at (down) {tiny S};
    end{blochsphere}

    end{document}





    share|improve this answer




























      2














      Encouraged by @marmot 's expert example I finally got this MWE of original request, note I had to drop ball opacity to 0.3



      enter image description here



      documentclass{standalone}

      usepackage{blochsphere}

      begin{document}

      begin{blochsphere}[ball=3d,opacity=0.3]
      drawBallGrid[style={opacity=1,ultra thin}]{30}{30}
      drawAxis[scale=1.2]{0}{0}
      drawAxis[scale=1.8]{90}{90}
      drawAxis[scale=1.4]{90}{0}
      labelLatLon{up}{90}{20};
      labelLatLon{down}{-90}{90};
      node[above,{shift=(0,0.2,0)}] at (up) {tiny N};
      node[below,{shift=(0,-0.2,0)}] at (down) {tiny S};
      end{blochsphere}

      end{document}





      share|improve this answer


























        2












        2








        2







        Encouraged by @marmot 's expert example I finally got this MWE of original request, note I had to drop ball opacity to 0.3



        enter image description here



        documentclass{standalone}

        usepackage{blochsphere}

        begin{document}

        begin{blochsphere}[ball=3d,opacity=0.3]
        drawBallGrid[style={opacity=1,ultra thin}]{30}{30}
        drawAxis[scale=1.2]{0}{0}
        drawAxis[scale=1.8]{90}{90}
        drawAxis[scale=1.4]{90}{0}
        labelLatLon{up}{90}{20};
        labelLatLon{down}{-90}{90};
        node[above,{shift=(0,0.2,0)}] at (up) {tiny N};
        node[below,{shift=(0,-0.2,0)}] at (down) {tiny S};
        end{blochsphere}

        end{document}





        share|improve this answer













        Encouraged by @marmot 's expert example I finally got this MWE of original request, note I had to drop ball opacity to 0.3



        enter image description here



        documentclass{standalone}

        usepackage{blochsphere}

        begin{document}

        begin{blochsphere}[ball=3d,opacity=0.3]
        drawBallGrid[style={opacity=1,ultra thin}]{30}{30}
        drawAxis[scale=1.2]{0}{0}
        drawAxis[scale=1.8]{90}{90}
        drawAxis[scale=1.4]{90}{0}
        labelLatLon{up}{90}{20};
        labelLatLon{down}{-90}{90};
        node[above,{shift=(0,0.2,0)}] at (up) {tiny N};
        node[below,{shift=(0,-0.2,0)}] at (down) {tiny S};
        end{blochsphere}

        end{document}






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 1 hour ago









        KJOKJO

        1,4821114




        1,4821114






























            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f470419%2fblochsphere-package-draw-black-axis%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

            Magento 2 controller redirect on button click in phtml file

            Polycentropodidae