TikZ: Advantage of position values attached with a unit?Drawing simple 3D cylinders in TikZtikz-3dplot causes...

Python: next in for loop

Font hinting is lost in Chrome-like browsers (for some languages )

A newer friend of my brother's gave him a load of baseball cards that are supposedly extremely valuable. Is this a scam?

Why was the small council so happy for Tyrion to become the Master of Coin?

Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?

What are the differences between the usage of 'it' and 'they'?

If I cast Expeditious Retreat, can I Dash as a bonus action on the same turn?

What do you call a Matrix-like slowdown and camera movement effect?

What is the word for reserving something for yourself before others do?

Have astronauts in space suits ever taken selfies? If so, how?

How old can references or sources in a thesis be?

Why do I get two different answers for this counting problem?

Modeling an IPv4 Address

Email Account under attack (really) - anything I can do?

How does one intimidate enemies without having the capacity for violence?

What are these boxed doors outside store fronts in New York?

Theorems that impeded progress

Why can't I see bouncing of a switch on an oscilloscope?

Has the BBC provided arguments for saying Brexit being cancelled is unlikely?

What does it mean to describe someone as a butt steak?

Can a Warlock become Neutral Good?

Why don't electron-positron collisions release infinite energy?

Writing rule stating superpower from different root cause is bad writing

Why Is Death Allowed In the Matrix?



TikZ: Advantage of position values attached with a unit?


Drawing simple 3D cylinders in TikZtikz-3dplot causes problems to let operatorRotate a node but not its content: the case of the ellipse decorationHow 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: Drawing an arc from an intersection to an intersectionHow to prevent rounded and duplicated tick labels in pgfplots with fixed precision?Drawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingLine up nested tikz enviroments or how to get rid of themHow to draw a square and its diagonals with arrows?begin{figure}… end{figure} is not working with tikz package













1















Regarding TikZ-images: When should I type positioning values attached with a unit (e.g. draw (0cm, 0cm)...) and when should I type them without a unit (e.g. simply draw (0, 0)...)?





Minimum Working Example No. 1:



documentclass[border=5mm]{standalone}
usepackage{tikz}

begin{document}
begin{tikzpicture}
draw (0, 0) rectangle (4, 4);
end{tikzpicture}
end{document}




Minimum Working Example No. 2:



documentclass[border=5mm]{standalone}
usepackage{tikz}

begin{document}
begin{tikzpicture}
draw (0cm, 0cm) rectangle (4cm, 4cm);
end{tikzpicture}
end{document}




Screenshot of the result from MWE no. 1:



Screenshot of MWE no. 1





Screenshot of the result from MWE no. 2:



Screenshot of MWE no. 2





As you can see, both codes will create the completely same picture. Therefore: What is the advantage of draw (0cm, 0cm)... over draw (0, 0)... and vice versa?










share|improve this question


















  • 1





    default unit in tikz (with some exception, for example at xshift, yshift) is cm, so, if you stick with it you not need to write it explicit.

    – Zarko
    7 hours ago













  • TikZ interprets (x,y) as x*e_1+y*e_2, where the defaults for the unit vectors e_i are e_1=(1cm,0) and e_2=(0,1cm). The perhaps clearest explanation can be found in this answer by LoopSpace, which was written at a time when Jake still had questions. And I disagree with @Zarko, the default unit for TikZ is pt.

    – marmot
    4 hours ago
















1















Regarding TikZ-images: When should I type positioning values attached with a unit (e.g. draw (0cm, 0cm)...) and when should I type them without a unit (e.g. simply draw (0, 0)...)?





Minimum Working Example No. 1:



documentclass[border=5mm]{standalone}
usepackage{tikz}

begin{document}
begin{tikzpicture}
draw (0, 0) rectangle (4, 4);
end{tikzpicture}
end{document}




Minimum Working Example No. 2:



documentclass[border=5mm]{standalone}
usepackage{tikz}

begin{document}
begin{tikzpicture}
draw (0cm, 0cm) rectangle (4cm, 4cm);
end{tikzpicture}
end{document}




Screenshot of the result from MWE no. 1:



Screenshot of MWE no. 1





Screenshot of the result from MWE no. 2:



Screenshot of MWE no. 2





As you can see, both codes will create the completely same picture. Therefore: What is the advantage of draw (0cm, 0cm)... over draw (0, 0)... and vice versa?










share|improve this question


















  • 1





    default unit in tikz (with some exception, for example at xshift, yshift) is cm, so, if you stick with it you not need to write it explicit.

    – Zarko
    7 hours ago













  • TikZ interprets (x,y) as x*e_1+y*e_2, where the defaults for the unit vectors e_i are e_1=(1cm,0) and e_2=(0,1cm). The perhaps clearest explanation can be found in this answer by LoopSpace, which was written at a time when Jake still had questions. And I disagree with @Zarko, the default unit for TikZ is pt.

    – marmot
    4 hours ago














1












1








1


1






Regarding TikZ-images: When should I type positioning values attached with a unit (e.g. draw (0cm, 0cm)...) and when should I type them without a unit (e.g. simply draw (0, 0)...)?





Minimum Working Example No. 1:



documentclass[border=5mm]{standalone}
usepackage{tikz}

begin{document}
begin{tikzpicture}
draw (0, 0) rectangle (4, 4);
end{tikzpicture}
end{document}




Minimum Working Example No. 2:



documentclass[border=5mm]{standalone}
usepackage{tikz}

begin{document}
begin{tikzpicture}
draw (0cm, 0cm) rectangle (4cm, 4cm);
end{tikzpicture}
end{document}




Screenshot of the result from MWE no. 1:



Screenshot of MWE no. 1





Screenshot of the result from MWE no. 2:



Screenshot of MWE no. 2





As you can see, both codes will create the completely same picture. Therefore: What is the advantage of draw (0cm, 0cm)... over draw (0, 0)... and vice versa?










share|improve this question














Regarding TikZ-images: When should I type positioning values attached with a unit (e.g. draw (0cm, 0cm)...) and when should I type them without a unit (e.g. simply draw (0, 0)...)?





Minimum Working Example No. 1:



documentclass[border=5mm]{standalone}
usepackage{tikz}

begin{document}
begin{tikzpicture}
draw (0, 0) rectangle (4, 4);
end{tikzpicture}
end{document}




Minimum Working Example No. 2:



documentclass[border=5mm]{standalone}
usepackage{tikz}

begin{document}
begin{tikzpicture}
draw (0cm, 0cm) rectangle (4cm, 4cm);
end{tikzpicture}
end{document}




Screenshot of the result from MWE no. 1:



Screenshot of MWE no. 1





Screenshot of the result from MWE no. 2:



Screenshot of MWE no. 2





As you can see, both codes will create the completely same picture. Therefore: What is the advantage of draw (0cm, 0cm)... over draw (0, 0)... and vice versa?







tikz-pgf positioning draw units unit-of-measure






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 7 hours ago









DaveDave

1,195619




1,195619








  • 1





    default unit in tikz (with some exception, for example at xshift, yshift) is cm, so, if you stick with it you not need to write it explicit.

    – Zarko
    7 hours ago













  • TikZ interprets (x,y) as x*e_1+y*e_2, where the defaults for the unit vectors e_i are e_1=(1cm,0) and e_2=(0,1cm). The perhaps clearest explanation can be found in this answer by LoopSpace, which was written at a time when Jake still had questions. And I disagree with @Zarko, the default unit for TikZ is pt.

    – marmot
    4 hours ago














  • 1





    default unit in tikz (with some exception, for example at xshift, yshift) is cm, so, if you stick with it you not need to write it explicit.

    – Zarko
    7 hours ago













  • TikZ interprets (x,y) as x*e_1+y*e_2, where the defaults for the unit vectors e_i are e_1=(1cm,0) and e_2=(0,1cm). The perhaps clearest explanation can be found in this answer by LoopSpace, which was written at a time when Jake still had questions. And I disagree with @Zarko, the default unit for TikZ is pt.

    – marmot
    4 hours ago








1




1





default unit in tikz (with some exception, for example at xshift, yshift) is cm, so, if you stick with it you not need to write it explicit.

– Zarko
7 hours ago







default unit in tikz (with some exception, for example at xshift, yshift) is cm, so, if you stick with it you not need to write it explicit.

– Zarko
7 hours ago















TikZ interprets (x,y) as x*e_1+y*e_2, where the defaults for the unit vectors e_i are e_1=(1cm,0) and e_2=(0,1cm). The perhaps clearest explanation can be found in this answer by LoopSpace, which was written at a time when Jake still had questions. And I disagree with @Zarko, the default unit for TikZ is pt.

– marmot
4 hours ago





TikZ interprets (x,y) as x*e_1+y*e_2, where the defaults for the unit vectors e_i are e_1=(1cm,0) and e_2=(0,1cm). The perhaps clearest explanation can be found in this answer by LoopSpace, which was written at a time when Jake still had questions. And I disagree with @Zarko, the default unit for TikZ is pt.

– marmot
4 hours ago










1 Answer
1






active

oldest

votes


















0














These two expressions are in principle very different and give "accidentally" the same result. IMHO the clearest discussion of this site can be found in this nice answer by LoopSpace, out of which I recycle some relevant parts here. TikZ interprets (x,y) rather differently depending on whether or not x and y carry units.




  1. If they are dimensionless, then the coordinate (x,y) means x times unit vector in x direction plus y times unit vector in y direction.

  2. If they carry units, then it just means x to the right and y up.


By default, the unit vector in x direction is (1cm,0) and the unit vector in y direction is (0,1cm), such that for two dimensionless numbers x and y in the default settings (x,y) and (xcm,ycm) yield the same result, which is what your MWEs illustrate. However, if we change the basis vectors, this is no longer true, as the following example shows (using a rectangle may not be the best example to illustrate these issues, but at least it is simple).



documentclass[border=5mm]{standalone}
usepackage{tikz}

begin{document}
begin{tikzpicture}[font=sffamily]
begin{scope}[local bounding box=standard]
begin{scope}[local bounding box=without units 1]
draw (0, 0) rectangle (4, 4);
end{scope}
node[above] at (without units 1.north){without units};
begin{scope}[xshift=5cm,local bounding box=with units 1]
draw (0cm, 0cm) rectangle (4cm, 4cm);
end{scope}
node[above] at (with units 1.north){with units};
end{scope}
node[rotate=90,above=2em] at (standard.west){standard unit vectors};
begin{scope}[local bounding box=nonstandard,
yshift=-5cm,x={(0.75,0.25)},y={(0,0.8)}]
begin{scope}[local bounding box=without units 2]
draw (0, 0) rectangle (4, 4);
end{scope}
node[above] at (without units 2.north){without units};
begin{scope}[xshift=5cm,local bounding box=with units 2]
draw (0cm, 0cm) rectangle (4cm, 4cm);
end{scope}
node[above] at (with units 2.north){with units};
end{scope}
node[rotate=90,above=2em] at (nonstandard.west){nonstandard unit vectors};
end{tikzpicture}
end{document}


enter image description here



Internally pgf uses pt as units, which is why the pgf key xshift=2 yields a shift by 2pt (as remarked by Zarko). However, this does not mean that the radii of circles get interpreted as pt, rather, as explained in this nice answer by LoopSpace the command draw[ultra thick] (0,0) circle[x radius=2,y radius=2]; yields, in the default coordinate system, a circle of radius 2cm.



So a possible answer to the question




When should I type positioning values attached with a unit (e.g. draw
(0cm, 0cm)...)
and when should I type them without a unit (e.g. simply
draw (0, 0)...)?




is




It depends on what you need and/or are doing. In many situations you
install nonstandard coordinate systems for a reason, which is why you
may not want to add cm when dealing with them.




Side-remark: the tikz-3dplot package adds cm to all coordinates, which can lead to confusion in some cases.






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%2f483577%2ftikz-advantage-of-position-values-attached-with-a-unit%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    These two expressions are in principle very different and give "accidentally" the same result. IMHO the clearest discussion of this site can be found in this nice answer by LoopSpace, out of which I recycle some relevant parts here. TikZ interprets (x,y) rather differently depending on whether or not x and y carry units.




    1. If they are dimensionless, then the coordinate (x,y) means x times unit vector in x direction plus y times unit vector in y direction.

    2. If they carry units, then it just means x to the right and y up.


    By default, the unit vector in x direction is (1cm,0) and the unit vector in y direction is (0,1cm), such that for two dimensionless numbers x and y in the default settings (x,y) and (xcm,ycm) yield the same result, which is what your MWEs illustrate. However, if we change the basis vectors, this is no longer true, as the following example shows (using a rectangle may not be the best example to illustrate these issues, but at least it is simple).



    documentclass[border=5mm]{standalone}
    usepackage{tikz}

    begin{document}
    begin{tikzpicture}[font=sffamily]
    begin{scope}[local bounding box=standard]
    begin{scope}[local bounding box=without units 1]
    draw (0, 0) rectangle (4, 4);
    end{scope}
    node[above] at (without units 1.north){without units};
    begin{scope}[xshift=5cm,local bounding box=with units 1]
    draw (0cm, 0cm) rectangle (4cm, 4cm);
    end{scope}
    node[above] at (with units 1.north){with units};
    end{scope}
    node[rotate=90,above=2em] at (standard.west){standard unit vectors};
    begin{scope}[local bounding box=nonstandard,
    yshift=-5cm,x={(0.75,0.25)},y={(0,0.8)}]
    begin{scope}[local bounding box=without units 2]
    draw (0, 0) rectangle (4, 4);
    end{scope}
    node[above] at (without units 2.north){without units};
    begin{scope}[xshift=5cm,local bounding box=with units 2]
    draw (0cm, 0cm) rectangle (4cm, 4cm);
    end{scope}
    node[above] at (with units 2.north){with units};
    end{scope}
    node[rotate=90,above=2em] at (nonstandard.west){nonstandard unit vectors};
    end{tikzpicture}
    end{document}


    enter image description here



    Internally pgf uses pt as units, which is why the pgf key xshift=2 yields a shift by 2pt (as remarked by Zarko). However, this does not mean that the radii of circles get interpreted as pt, rather, as explained in this nice answer by LoopSpace the command draw[ultra thick] (0,0) circle[x radius=2,y radius=2]; yields, in the default coordinate system, a circle of radius 2cm.



    So a possible answer to the question




    When should I type positioning values attached with a unit (e.g. draw
    (0cm, 0cm)...)
    and when should I type them without a unit (e.g. simply
    draw (0, 0)...)?




    is




    It depends on what you need and/or are doing. In many situations you
    install nonstandard coordinate systems for a reason, which is why you
    may not want to add cm when dealing with them.




    Side-remark: the tikz-3dplot package adds cm to all coordinates, which can lead to confusion in some cases.






    share|improve this answer




























      0














      These two expressions are in principle very different and give "accidentally" the same result. IMHO the clearest discussion of this site can be found in this nice answer by LoopSpace, out of which I recycle some relevant parts here. TikZ interprets (x,y) rather differently depending on whether or not x and y carry units.




      1. If they are dimensionless, then the coordinate (x,y) means x times unit vector in x direction plus y times unit vector in y direction.

      2. If they carry units, then it just means x to the right and y up.


      By default, the unit vector in x direction is (1cm,0) and the unit vector in y direction is (0,1cm), such that for two dimensionless numbers x and y in the default settings (x,y) and (xcm,ycm) yield the same result, which is what your MWEs illustrate. However, if we change the basis vectors, this is no longer true, as the following example shows (using a rectangle may not be the best example to illustrate these issues, but at least it is simple).



      documentclass[border=5mm]{standalone}
      usepackage{tikz}

      begin{document}
      begin{tikzpicture}[font=sffamily]
      begin{scope}[local bounding box=standard]
      begin{scope}[local bounding box=without units 1]
      draw (0, 0) rectangle (4, 4);
      end{scope}
      node[above] at (without units 1.north){without units};
      begin{scope}[xshift=5cm,local bounding box=with units 1]
      draw (0cm, 0cm) rectangle (4cm, 4cm);
      end{scope}
      node[above] at (with units 1.north){with units};
      end{scope}
      node[rotate=90,above=2em] at (standard.west){standard unit vectors};
      begin{scope}[local bounding box=nonstandard,
      yshift=-5cm,x={(0.75,0.25)},y={(0,0.8)}]
      begin{scope}[local bounding box=without units 2]
      draw (0, 0) rectangle (4, 4);
      end{scope}
      node[above] at (without units 2.north){without units};
      begin{scope}[xshift=5cm,local bounding box=with units 2]
      draw (0cm, 0cm) rectangle (4cm, 4cm);
      end{scope}
      node[above] at (with units 2.north){with units};
      end{scope}
      node[rotate=90,above=2em] at (nonstandard.west){nonstandard unit vectors};
      end{tikzpicture}
      end{document}


      enter image description here



      Internally pgf uses pt as units, which is why the pgf key xshift=2 yields a shift by 2pt (as remarked by Zarko). However, this does not mean that the radii of circles get interpreted as pt, rather, as explained in this nice answer by LoopSpace the command draw[ultra thick] (0,0) circle[x radius=2,y radius=2]; yields, in the default coordinate system, a circle of radius 2cm.



      So a possible answer to the question




      When should I type positioning values attached with a unit (e.g. draw
      (0cm, 0cm)...)
      and when should I type them without a unit (e.g. simply
      draw (0, 0)...)?




      is




      It depends on what you need and/or are doing. In many situations you
      install nonstandard coordinate systems for a reason, which is why you
      may not want to add cm when dealing with them.




      Side-remark: the tikz-3dplot package adds cm to all coordinates, which can lead to confusion in some cases.






      share|improve this answer


























        0












        0








        0







        These two expressions are in principle very different and give "accidentally" the same result. IMHO the clearest discussion of this site can be found in this nice answer by LoopSpace, out of which I recycle some relevant parts here. TikZ interprets (x,y) rather differently depending on whether or not x and y carry units.




        1. If they are dimensionless, then the coordinate (x,y) means x times unit vector in x direction plus y times unit vector in y direction.

        2. If they carry units, then it just means x to the right and y up.


        By default, the unit vector in x direction is (1cm,0) and the unit vector in y direction is (0,1cm), such that for two dimensionless numbers x and y in the default settings (x,y) and (xcm,ycm) yield the same result, which is what your MWEs illustrate. However, if we change the basis vectors, this is no longer true, as the following example shows (using a rectangle may not be the best example to illustrate these issues, but at least it is simple).



        documentclass[border=5mm]{standalone}
        usepackage{tikz}

        begin{document}
        begin{tikzpicture}[font=sffamily]
        begin{scope}[local bounding box=standard]
        begin{scope}[local bounding box=without units 1]
        draw (0, 0) rectangle (4, 4);
        end{scope}
        node[above] at (without units 1.north){without units};
        begin{scope}[xshift=5cm,local bounding box=with units 1]
        draw (0cm, 0cm) rectangle (4cm, 4cm);
        end{scope}
        node[above] at (with units 1.north){with units};
        end{scope}
        node[rotate=90,above=2em] at (standard.west){standard unit vectors};
        begin{scope}[local bounding box=nonstandard,
        yshift=-5cm,x={(0.75,0.25)},y={(0,0.8)}]
        begin{scope}[local bounding box=without units 2]
        draw (0, 0) rectangle (4, 4);
        end{scope}
        node[above] at (without units 2.north){without units};
        begin{scope}[xshift=5cm,local bounding box=with units 2]
        draw (0cm, 0cm) rectangle (4cm, 4cm);
        end{scope}
        node[above] at (with units 2.north){with units};
        end{scope}
        node[rotate=90,above=2em] at (nonstandard.west){nonstandard unit vectors};
        end{tikzpicture}
        end{document}


        enter image description here



        Internally pgf uses pt as units, which is why the pgf key xshift=2 yields a shift by 2pt (as remarked by Zarko). However, this does not mean that the radii of circles get interpreted as pt, rather, as explained in this nice answer by LoopSpace the command draw[ultra thick] (0,0) circle[x radius=2,y radius=2]; yields, in the default coordinate system, a circle of radius 2cm.



        So a possible answer to the question




        When should I type positioning values attached with a unit (e.g. draw
        (0cm, 0cm)...)
        and when should I type them without a unit (e.g. simply
        draw (0, 0)...)?




        is




        It depends on what you need and/or are doing. In many situations you
        install nonstandard coordinate systems for a reason, which is why you
        may not want to add cm when dealing with them.




        Side-remark: the tikz-3dplot package adds cm to all coordinates, which can lead to confusion in some cases.






        share|improve this answer













        These two expressions are in principle very different and give "accidentally" the same result. IMHO the clearest discussion of this site can be found in this nice answer by LoopSpace, out of which I recycle some relevant parts here. TikZ interprets (x,y) rather differently depending on whether or not x and y carry units.




        1. If they are dimensionless, then the coordinate (x,y) means x times unit vector in x direction plus y times unit vector in y direction.

        2. If they carry units, then it just means x to the right and y up.


        By default, the unit vector in x direction is (1cm,0) and the unit vector in y direction is (0,1cm), such that for two dimensionless numbers x and y in the default settings (x,y) and (xcm,ycm) yield the same result, which is what your MWEs illustrate. However, if we change the basis vectors, this is no longer true, as the following example shows (using a rectangle may not be the best example to illustrate these issues, but at least it is simple).



        documentclass[border=5mm]{standalone}
        usepackage{tikz}

        begin{document}
        begin{tikzpicture}[font=sffamily]
        begin{scope}[local bounding box=standard]
        begin{scope}[local bounding box=without units 1]
        draw (0, 0) rectangle (4, 4);
        end{scope}
        node[above] at (without units 1.north){without units};
        begin{scope}[xshift=5cm,local bounding box=with units 1]
        draw (0cm, 0cm) rectangle (4cm, 4cm);
        end{scope}
        node[above] at (with units 1.north){with units};
        end{scope}
        node[rotate=90,above=2em] at (standard.west){standard unit vectors};
        begin{scope}[local bounding box=nonstandard,
        yshift=-5cm,x={(0.75,0.25)},y={(0,0.8)}]
        begin{scope}[local bounding box=without units 2]
        draw (0, 0) rectangle (4, 4);
        end{scope}
        node[above] at (without units 2.north){without units};
        begin{scope}[xshift=5cm,local bounding box=with units 2]
        draw (0cm, 0cm) rectangle (4cm, 4cm);
        end{scope}
        node[above] at (with units 2.north){with units};
        end{scope}
        node[rotate=90,above=2em] at (nonstandard.west){nonstandard unit vectors};
        end{tikzpicture}
        end{document}


        enter image description here



        Internally pgf uses pt as units, which is why the pgf key xshift=2 yields a shift by 2pt (as remarked by Zarko). However, this does not mean that the radii of circles get interpreted as pt, rather, as explained in this nice answer by LoopSpace the command draw[ultra thick] (0,0) circle[x radius=2,y radius=2]; yields, in the default coordinate system, a circle of radius 2cm.



        So a possible answer to the question




        When should I type positioning values attached with a unit (e.g. draw
        (0cm, 0cm)...)
        and when should I type them without a unit (e.g. simply
        draw (0, 0)...)?




        is




        It depends on what you need and/or are doing. In many situations you
        install nonstandard coordinate systems for a reason, which is why you
        may not want to add cm when dealing with them.




        Side-remark: the tikz-3dplot package adds cm to all coordinates, which can lead to confusion in some cases.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 1 hour ago









        marmotmarmot

        115k5146277




        115k5146277






























            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%2f483577%2ftikz-advantage-of-position-values-attached-with-a-unit%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

            El tren de la libertad Índice Antecedentes "Porque yo decido" Desarrollo de la...

            Puerta de Hutt Referencias Enlaces externos Menú de navegación15°58′00″S 5°42′00″O /...

            Castillo d'Acher Características Menú de navegación