How to move tikzpicture with named nodes?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I am trying to position an image with rounded corners to a specific position on screen. However, according to the following post, yshift and xshift do not affect nodes that are named and I am still a bit confused on how to use the ++ and if this is the best approach.



Take my current situation:



documentclassarticle
usepackage[utf8]inputenc
usepackagegraphicx
usepackagetikz
usepackage[a4paper,top=3cm, bottom=3cm, left=2cm, right=2cm]geometry

begindocument

begintikzpicture
beginscope
clip [rounded corners=0.7cm] (0,0) rectangle coordinate (centerpoint) (4,4.0cm);
node [inner sep=0pt] at (centerpoint) includegraphics[width=4.0cm]dogesmall.jpg;

draw[line width=0.08cm,rounded corners=0.7cm] (0,0) rectangle (4,4.0cm);
endscope
endtikzpicture

enddocument


(Where "dogesmall.jpg" is my current image)



This produces a result that places the image in the upper left hand corner, as defined by the margins. However, I would like to tweak the position of the tikzpicture without changing the margins like so:



                                            
Babou



How would I go about accomplishing such a task?



I tried following this post by using the following:



newcommandsetcoordinates
coordinate (centerpoint) at (4,4.0cm);



And then referencing this coordinate by coordinate (centerpoint) and then applying a shift transformation, but that does not work either. Any thoughts?










share|improve this question







New contributor




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























    up vote
    2
    down vote

    favorite












    I am trying to position an image with rounded corners to a specific position on screen. However, according to the following post, yshift and xshift do not affect nodes that are named and I am still a bit confused on how to use the ++ and if this is the best approach.



    Take my current situation:



    documentclassarticle
    usepackage[utf8]inputenc
    usepackagegraphicx
    usepackagetikz
    usepackage[a4paper,top=3cm, bottom=3cm, left=2cm, right=2cm]geometry

    begindocument

    begintikzpicture
    beginscope
    clip [rounded corners=0.7cm] (0,0) rectangle coordinate (centerpoint) (4,4.0cm);
    node [inner sep=0pt] at (centerpoint) includegraphics[width=4.0cm]dogesmall.jpg;

    draw[line width=0.08cm,rounded corners=0.7cm] (0,0) rectangle (4,4.0cm);
    endscope
    endtikzpicture

    enddocument


    (Where "dogesmall.jpg" is my current image)



    This produces a result that places the image in the upper left hand corner, as defined by the margins. However, I would like to tweak the position of the tikzpicture without changing the margins like so:



                                                
    Babou



    How would I go about accomplishing such a task?



    I tried following this post by using the following:



    newcommandsetcoordinates
    coordinate (centerpoint) at (4,4.0cm);



    And then referencing this coordinate by coordinate (centerpoint) and then applying a shift transformation, but that does not work either. Any thoughts?










    share|improve this question







    New contributor




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





















      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I am trying to position an image with rounded corners to a specific position on screen. However, according to the following post, yshift and xshift do not affect nodes that are named and I am still a bit confused on how to use the ++ and if this is the best approach.



      Take my current situation:



      documentclassarticle
      usepackage[utf8]inputenc
      usepackagegraphicx
      usepackagetikz
      usepackage[a4paper,top=3cm, bottom=3cm, left=2cm, right=2cm]geometry

      begindocument

      begintikzpicture
      beginscope
      clip [rounded corners=0.7cm] (0,0) rectangle coordinate (centerpoint) (4,4.0cm);
      node [inner sep=0pt] at (centerpoint) includegraphics[width=4.0cm]dogesmall.jpg;

      draw[line width=0.08cm,rounded corners=0.7cm] (0,0) rectangle (4,4.0cm);
      endscope
      endtikzpicture

      enddocument


      (Where "dogesmall.jpg" is my current image)



      This produces a result that places the image in the upper left hand corner, as defined by the margins. However, I would like to tweak the position of the tikzpicture without changing the margins like so:



                                                  
      Babou



      How would I go about accomplishing such a task?



      I tried following this post by using the following:



      newcommandsetcoordinates
      coordinate (centerpoint) at (4,4.0cm);



      And then referencing this coordinate by coordinate (centerpoint) and then applying a shift transformation, but that does not work either. Any thoughts?










      share|improve this question







      New contributor




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











      I am trying to position an image with rounded corners to a specific position on screen. However, according to the following post, yshift and xshift do not affect nodes that are named and I am still a bit confused on how to use the ++ and if this is the best approach.



      Take my current situation:



      documentclassarticle
      usepackage[utf8]inputenc
      usepackagegraphicx
      usepackagetikz
      usepackage[a4paper,top=3cm, bottom=3cm, left=2cm, right=2cm]geometry

      begindocument

      begintikzpicture
      beginscope
      clip [rounded corners=0.7cm] (0,0) rectangle coordinate (centerpoint) (4,4.0cm);
      node [inner sep=0pt] at (centerpoint) includegraphics[width=4.0cm]dogesmall.jpg;

      draw[line width=0.08cm,rounded corners=0.7cm] (0,0) rectangle (4,4.0cm);
      endscope
      endtikzpicture

      enddocument


      (Where "dogesmall.jpg" is my current image)



      This produces a result that places the image in the upper left hand corner, as defined by the margins. However, I would like to tweak the position of the tikzpicture without changing the margins like so:



                                                  
      Babou



      How would I go about accomplishing such a task?



      I tried following this post by using the following:



      newcommandsetcoordinates
      coordinate (centerpoint) at (4,4.0cm);



      And then referencing this coordinate by coordinate (centerpoint) and then applying a shift transformation, but that does not work either. Any thoughts?







      tikz-pgf positioning tikz-pic






      share|improve this question







      New contributor




      Dan Hoynoski 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




      Dan Hoynoski 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






      New contributor




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









      asked 2 hours ago









      Dan Hoynoski

      1113




      1113




      New contributor




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





      New contributor





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






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




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote













          Welcome to TeX.SE! Are you looking for overlay, which allows you to position stuff at absolute coordinates?



          documentclassarticle
          usepackage[utf8]inputenc
          usepackagetikzpagenodes
          usepackage[a4paper,top=3cm, bottom=3cm, left=2cm, right=2cm]geometry

          begindocument

          begintikzpicture[overlay,remember picture]
          beginscope
          clip [rounded corners=0.7cm] (current page text area.north west) coordinate (centerpoint) rectangle ++(4,-4);
          node [inner sep=0pt,anchor=north west] at (centerpoint)
          includegraphics[width=4.0cm,height=4cm]example-image-duck;
          endscope
          draw[line width=0.08cm,rounded corners=0.7cm] (centerpoint) rectangle ++(4,-4);
          endtikzpicture

          enddocument


          enter image description here



          If you want to place the image at the upper left corner of the page (rather than the upper left corner of the of the text area), replace (current page text area.north west) by (current page.north west).






          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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );






            Dan Hoynoski 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%2f454066%2fhow-to-move-tikzpicture-with-named-nodes%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            3
            down vote













            Welcome to TeX.SE! Are you looking for overlay, which allows you to position stuff at absolute coordinates?



            documentclassarticle
            usepackage[utf8]inputenc
            usepackagetikzpagenodes
            usepackage[a4paper,top=3cm, bottom=3cm, left=2cm, right=2cm]geometry

            begindocument

            begintikzpicture[overlay,remember picture]
            beginscope
            clip [rounded corners=0.7cm] (current page text area.north west) coordinate (centerpoint) rectangle ++(4,-4);
            node [inner sep=0pt,anchor=north west] at (centerpoint)
            includegraphics[width=4.0cm,height=4cm]example-image-duck;
            endscope
            draw[line width=0.08cm,rounded corners=0.7cm] (centerpoint) rectangle ++(4,-4);
            endtikzpicture

            enddocument


            enter image description here



            If you want to place the image at the upper left corner of the page (rather than the upper left corner of the of the text area), replace (current page text area.north west) by (current page.north west).






            share|improve this answer
























              up vote
              3
              down vote













              Welcome to TeX.SE! Are you looking for overlay, which allows you to position stuff at absolute coordinates?



              documentclassarticle
              usepackage[utf8]inputenc
              usepackagetikzpagenodes
              usepackage[a4paper,top=3cm, bottom=3cm, left=2cm, right=2cm]geometry

              begindocument

              begintikzpicture[overlay,remember picture]
              beginscope
              clip [rounded corners=0.7cm] (current page text area.north west) coordinate (centerpoint) rectangle ++(4,-4);
              node [inner sep=0pt,anchor=north west] at (centerpoint)
              includegraphics[width=4.0cm,height=4cm]example-image-duck;
              endscope
              draw[line width=0.08cm,rounded corners=0.7cm] (centerpoint) rectangle ++(4,-4);
              endtikzpicture

              enddocument


              enter image description here



              If you want to place the image at the upper left corner of the page (rather than the upper left corner of the of the text area), replace (current page text area.north west) by (current page.north west).






              share|improve this answer






















                up vote
                3
                down vote










                up vote
                3
                down vote









                Welcome to TeX.SE! Are you looking for overlay, which allows you to position stuff at absolute coordinates?



                documentclassarticle
                usepackage[utf8]inputenc
                usepackagetikzpagenodes
                usepackage[a4paper,top=3cm, bottom=3cm, left=2cm, right=2cm]geometry

                begindocument

                begintikzpicture[overlay,remember picture]
                beginscope
                clip [rounded corners=0.7cm] (current page text area.north west) coordinate (centerpoint) rectangle ++(4,-4);
                node [inner sep=0pt,anchor=north west] at (centerpoint)
                includegraphics[width=4.0cm,height=4cm]example-image-duck;
                endscope
                draw[line width=0.08cm,rounded corners=0.7cm] (centerpoint) rectangle ++(4,-4);
                endtikzpicture

                enddocument


                enter image description here



                If you want to place the image at the upper left corner of the page (rather than the upper left corner of the of the text area), replace (current page text area.north west) by (current page.north west).






                share|improve this answer












                Welcome to TeX.SE! Are you looking for overlay, which allows you to position stuff at absolute coordinates?



                documentclassarticle
                usepackage[utf8]inputenc
                usepackagetikzpagenodes
                usepackage[a4paper,top=3cm, bottom=3cm, left=2cm, right=2cm]geometry

                begindocument

                begintikzpicture[overlay,remember picture]
                beginscope
                clip [rounded corners=0.7cm] (current page text area.north west) coordinate (centerpoint) rectangle ++(4,-4);
                node [inner sep=0pt,anchor=north west] at (centerpoint)
                includegraphics[width=4.0cm,height=4cm]example-image-duck;
                endscope
                draw[line width=0.08cm,rounded corners=0.7cm] (centerpoint) rectangle ++(4,-4);
                endtikzpicture

                enddocument


                enter image description here



                If you want to place the image at the upper left corner of the page (rather than the upper left corner of the of the text area), replace (current page text area.north west) by (current page.north west).







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 1 hour ago









                marmot

                63.1k468135




                63.1k468135




















                    Dan Hoynoski is a new contributor. Be nice, and check out our Code of Conduct.









                     

                    draft saved


                    draft discarded


















                    Dan Hoynoski is a new contributor. Be nice, and check out our Code of Conduct.












                    Dan Hoynoski is a new contributor. Be nice, and check out our Code of Conduct.











                    Dan Hoynoski 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%2f454066%2fhow-to-move-tikzpicture-with-named-nodes%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    What does second last employer means? [closed]

                    Installing NextGIS Connect into QGIS 3?

                    One-line joke