How to use a tikzpicture as a node shapeRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?Computing the rectangle encompassing a node and a pointNumerical conditional within tikz keys?Adding extra nodes at anchors of rectangular node custom shape in tikz?use circuitikz picture inside tikzpictureTikZ: Drawing an arc from an intersection to an intersectionAdjusting edge alignment and positioning of fitted nodeLine up nested tikz enviroments or how to get rid of themNode anchor centre of line

How to run a command 1 out of N times in Bash

Heuristic argument for the Riemann Hypothesis

Get rows that exist exactly once per day for a given period

Is Borg adaptation only temporary?

'spazieren' - walking in a silly and affected manner?

Why do modes sound so different, although they are basically the same as a mode of another scale?

Single vs Multiple Try Catch

Replace a motion-sensor/timer with simple single pole switch

How to have the "Restore Missing Files" function from Nautilus without installing Nautilus?

meaning of "educating the ice"?

Ways you can end up paying interest on a credit card if you pay the full amount back in due time

Using font to highlight a god's speech in dialogue

Calculate Landau's function

Can UV radiation be safe for the skin?

Why is Mitch McConnell blocking nominees to the Federal Election Commission?

From not IT background to being a programmer

How were US credit cards verified in-store in the 1980's?

How can I improve my formal definitions?

What is the motivation behind designing a control stick that does not move?

Can authors email you PDFs of their textbook for free?

The Justice Thought & System & its Morals?

Using large parts of a research paper

How to encrypt the .viminfo file and still get Vim to read it?

How do I get my neighbour to stop disturbing with loud music?



How to use a tikzpicture as a node shape


Rotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?Computing the rectangle encompassing a node and a pointNumerical conditional within tikz keys?Adding extra nodes at anchors of rectangular node custom shape in tikz?use circuitikz picture inside tikzpictureTikZ: Drawing an arc from an intersection to an intersectionAdjusting edge alignment and positioning of fitted nodeLine up nested tikz enviroments or how to get rid of themNode anchor centre of line






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















In this figure,



documentclass[border=1mm]standalone
usepackageamsmath
usepackagetikz,pgfplots
pgfplotssetwidth=11cm,compat=1.15
usetikzlibrarypositioning %<<<<----OJO
usetikzlibraryarrows.meta,calc,decorations.markings,math,arrows.meta

begindocument

begintikzpicture[
roundnode/.style=circle, draw=black!60, fill=green!5, minimum size=8.5mm, line width=1.5mm,
squarednode/.style=rectangle, draw=red!60, fill=red!5, minimum size=7mm,
align=center,node distance=2.25cm,
scale=4,
% every node/.style=scale=4,
every node/.style=transform shape
]
%Nodes
node[roundnode] (A) Large 1;
node[roundnode] (B) [below of =A] Large 2;
node[roundnode] (C) [below of= B] Large 3;
node[roundnode] (D) [below of= C] Large 4;
node[roundnode, node distance=2.75cm,] (M) [below of= D] Large $m$;
%%%

%% CARTS
node[squarednode] (C1) [right of= A] Large c1;
node[squarednode, node distance=1.25cm,] (C2) [right of= C1] Large c2;
node[squarednode, node distance=1.25cm,] (C3) [right of= C2] Large c3;
%
node[squarednode] (C4) [right of= B] Large c4;
%
node[squarednode] (C5) [right of= C] Large c5;
node[squarednode, node distance=1.25cm,] (C6) [right of= C5] Large c6;
%
node[squarednode] (C7) [right of= D] Large c7;
node[squarednode, node distance=1.25cm,] (C8) [right of= C7] Large c8;
node[squarednode, node distance=1.25cm,] (C9) [right of= C8] Large c9;
%
node[squarednode] (C10) [right of= M] Large c10;

%%
node[circle, minimum size=0.5mm, fill=black!40, node distance=5cm, yshift=-0.25cm, inner sep=0pt] (E0) [right of= C6] ;



%Lines
draw[-,line width=0.5mm,] (A) -- (B);
draw[-,line width=0.5mm] (B) -- (C);
draw[-,line width=0.5mm,] (C) -- (D);
%
draw[loosely dotted,line width=0.65mm] (D) -- (M);

draw [dashed,black,line width=0.5mm,] (A.west) to [out=210,in=140] (C.west);
draw [dashed,black,line width=0.5mm,] (B.west) to [out=210,in=140] (D.west);

%%%%%%%%%%%%%
% From X to carts
draw [->[scale=1.5], red,line width=0.5mm,] (E0.north) to [out=90,in=0] (C3.east);
draw [->[scale=1.5], red,line width=0.5mm,] (E0.north) to [out=120,in=0] (C4.east);
draw [->[scale=1.5], red,line width=0.5mm,] (E0.west) to [out=165,in=0] (C6.east);
draw [->[scale=1.5], red,line width=0.5mm,] (E0.south) to [out=235,in=0] (C9.east);
draw [->[scale=1.5], red,line width=0.5mm,] (E0.south) to [out=270,in=0] (C10.east);

%%%%
%% MORE CARTS
node[squarednode, node distance=0.75cm, outer sep = 0.20cm] (E1) [right of= E0] Large c11;
node[squarednode, node distance=1.50cm, outer sep = 0.20cm] (E2) [right of= E1] Large c12;
node[squarednode, node distance=2.00cm, outer sep = 0.20cm] (E3) [right of= E2] Large c13;

%% lines dotted
draw[-, red, loosely dotted, line width=0.65mm,] (E1) -- (E2);
draw[-, red, loosely dotted, line width=0.65mm,] (E2) -- (E3);
%
node[yshift=-1.25cm, xshift= 0.25cm] (T1) [above of =E2] $lambda$ arrivals per second;

%%%%%
% LEGEND
node[squarednode, yshift=-1cm, xshift=-0.5cm] (L11) [below of= E2] C;
node[yshift=1.25cm,] (L12) [below of= L11] Shopping\Cart;
%
node[roundnode, ] (L21) [right of= L11] ;
node[yshift=1.25cm,] (L22) [below of= L21] Shop\Paypoint;

endtikzpicture

enddocument


enter image description here



I would like to replace each of the red square nodes by a shopping cart tikzpicture (no text is needed inside the cart):



documentclass[border=1mm]standalone
usepackageamsmath
usepackagepgf,tikz,pgfplots
pgfplotssetcompat=1.15
usetikzlibraryarrows

begindocument
% definecolorzzttqqrgb0.6,0.2,0
% definecolorududffrgb0.3,0.3,1

begintikzpicture[line cap=round,line join=round,>=triangle 45]
% draw[help lines,step=] (-3,-1) grid (3,7);
filldraw[line width=2pt,color=purple,fill=brown!30]
(-2.58,4.28) -- (-2.30,2.93) -- (0.59,2.67) -- (1.11,4.39) -- cycle;
draw [line width=2pt] (-2.40,2.16)-- (0.84,2.16);
draw [line width=2pt] (0.84,2.16)-- (0.59,2.67);
draw [line width=2pt] (1.11,4.39)-- (1.39,4.78);
draw [line width=2pt] (1.39,4.78)-- (1.72,4.78);
draw [line width=2.8pt] (-2.17,1.78) circle (0.25cm);
draw [line width=2.8pt] (0.43,1.78) circle (0.25cm);
endtikzpicture

enddocument


enter image description here



with the cart scaled to similar size of the square red nodes.



How can I replace the square nodes by carts? (e.g. c1, c2 and c3 will be three carts at the right of node 1).










share|improve this question









New contributor



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



























    3















    In this figure,



    documentclass[border=1mm]standalone
    usepackageamsmath
    usepackagetikz,pgfplots
    pgfplotssetwidth=11cm,compat=1.15
    usetikzlibrarypositioning %<<<<----OJO
    usetikzlibraryarrows.meta,calc,decorations.markings,math,arrows.meta

    begindocument

    begintikzpicture[
    roundnode/.style=circle, draw=black!60, fill=green!5, minimum size=8.5mm, line width=1.5mm,
    squarednode/.style=rectangle, draw=red!60, fill=red!5, minimum size=7mm,
    align=center,node distance=2.25cm,
    scale=4,
    % every node/.style=scale=4,
    every node/.style=transform shape
    ]
    %Nodes
    node[roundnode] (A) Large 1;
    node[roundnode] (B) [below of =A] Large 2;
    node[roundnode] (C) [below of= B] Large 3;
    node[roundnode] (D) [below of= C] Large 4;
    node[roundnode, node distance=2.75cm,] (M) [below of= D] Large $m$;
    %%%

    %% CARTS
    node[squarednode] (C1) [right of= A] Large c1;
    node[squarednode, node distance=1.25cm,] (C2) [right of= C1] Large c2;
    node[squarednode, node distance=1.25cm,] (C3) [right of= C2] Large c3;
    %
    node[squarednode] (C4) [right of= B] Large c4;
    %
    node[squarednode] (C5) [right of= C] Large c5;
    node[squarednode, node distance=1.25cm,] (C6) [right of= C5] Large c6;
    %
    node[squarednode] (C7) [right of= D] Large c7;
    node[squarednode, node distance=1.25cm,] (C8) [right of= C7] Large c8;
    node[squarednode, node distance=1.25cm,] (C9) [right of= C8] Large c9;
    %
    node[squarednode] (C10) [right of= M] Large c10;

    %%
    node[circle, minimum size=0.5mm, fill=black!40, node distance=5cm, yshift=-0.25cm, inner sep=0pt] (E0) [right of= C6] ;



    %Lines
    draw[-,line width=0.5mm,] (A) -- (B);
    draw[-,line width=0.5mm] (B) -- (C);
    draw[-,line width=0.5mm,] (C) -- (D);
    %
    draw[loosely dotted,line width=0.65mm] (D) -- (M);

    draw [dashed,black,line width=0.5mm,] (A.west) to [out=210,in=140] (C.west);
    draw [dashed,black,line width=0.5mm,] (B.west) to [out=210,in=140] (D.west);

    %%%%%%%%%%%%%
    % From X to carts
    draw [->[scale=1.5], red,line width=0.5mm,] (E0.north) to [out=90,in=0] (C3.east);
    draw [->[scale=1.5], red,line width=0.5mm,] (E0.north) to [out=120,in=0] (C4.east);
    draw [->[scale=1.5], red,line width=0.5mm,] (E0.west) to [out=165,in=0] (C6.east);
    draw [->[scale=1.5], red,line width=0.5mm,] (E0.south) to [out=235,in=0] (C9.east);
    draw [->[scale=1.5], red,line width=0.5mm,] (E0.south) to [out=270,in=0] (C10.east);

    %%%%
    %% MORE CARTS
    node[squarednode, node distance=0.75cm, outer sep = 0.20cm] (E1) [right of= E0] Large c11;
    node[squarednode, node distance=1.50cm, outer sep = 0.20cm] (E2) [right of= E1] Large c12;
    node[squarednode, node distance=2.00cm, outer sep = 0.20cm] (E3) [right of= E2] Large c13;

    %% lines dotted
    draw[-, red, loosely dotted, line width=0.65mm,] (E1) -- (E2);
    draw[-, red, loosely dotted, line width=0.65mm,] (E2) -- (E3);
    %
    node[yshift=-1.25cm, xshift= 0.25cm] (T1) [above of =E2] $lambda$ arrivals per second;

    %%%%%
    % LEGEND
    node[squarednode, yshift=-1cm, xshift=-0.5cm] (L11) [below of= E2] C;
    node[yshift=1.25cm,] (L12) [below of= L11] Shopping\Cart;
    %
    node[roundnode, ] (L21) [right of= L11] ;
    node[yshift=1.25cm,] (L22) [below of= L21] Shop\Paypoint;

    endtikzpicture

    enddocument


    enter image description here



    I would like to replace each of the red square nodes by a shopping cart tikzpicture (no text is needed inside the cart):



    documentclass[border=1mm]standalone
    usepackageamsmath
    usepackagepgf,tikz,pgfplots
    pgfplotssetcompat=1.15
    usetikzlibraryarrows

    begindocument
    % definecolorzzttqqrgb0.6,0.2,0
    % definecolorududffrgb0.3,0.3,1

    begintikzpicture[line cap=round,line join=round,>=triangle 45]
    % draw[help lines,step=] (-3,-1) grid (3,7);
    filldraw[line width=2pt,color=purple,fill=brown!30]
    (-2.58,4.28) -- (-2.30,2.93) -- (0.59,2.67) -- (1.11,4.39) -- cycle;
    draw [line width=2pt] (-2.40,2.16)-- (0.84,2.16);
    draw [line width=2pt] (0.84,2.16)-- (0.59,2.67);
    draw [line width=2pt] (1.11,4.39)-- (1.39,4.78);
    draw [line width=2pt] (1.39,4.78)-- (1.72,4.78);
    draw [line width=2.8pt] (-2.17,1.78) circle (0.25cm);
    draw [line width=2.8pt] (0.43,1.78) circle (0.25cm);
    endtikzpicture

    enddocument


    enter image description here



    with the cart scaled to similar size of the square red nodes.



    How can I replace the square nodes by carts? (e.g. c1, c2 and c3 will be three carts at the right of node 1).










    share|improve this question









    New contributor



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























      3












      3








      3








      In this figure,



      documentclass[border=1mm]standalone
      usepackageamsmath
      usepackagetikz,pgfplots
      pgfplotssetwidth=11cm,compat=1.15
      usetikzlibrarypositioning %<<<<----OJO
      usetikzlibraryarrows.meta,calc,decorations.markings,math,arrows.meta

      begindocument

      begintikzpicture[
      roundnode/.style=circle, draw=black!60, fill=green!5, minimum size=8.5mm, line width=1.5mm,
      squarednode/.style=rectangle, draw=red!60, fill=red!5, minimum size=7mm,
      align=center,node distance=2.25cm,
      scale=4,
      % every node/.style=scale=4,
      every node/.style=transform shape
      ]
      %Nodes
      node[roundnode] (A) Large 1;
      node[roundnode] (B) [below of =A] Large 2;
      node[roundnode] (C) [below of= B] Large 3;
      node[roundnode] (D) [below of= C] Large 4;
      node[roundnode, node distance=2.75cm,] (M) [below of= D] Large $m$;
      %%%

      %% CARTS
      node[squarednode] (C1) [right of= A] Large c1;
      node[squarednode, node distance=1.25cm,] (C2) [right of= C1] Large c2;
      node[squarednode, node distance=1.25cm,] (C3) [right of= C2] Large c3;
      %
      node[squarednode] (C4) [right of= B] Large c4;
      %
      node[squarednode] (C5) [right of= C] Large c5;
      node[squarednode, node distance=1.25cm,] (C6) [right of= C5] Large c6;
      %
      node[squarednode] (C7) [right of= D] Large c7;
      node[squarednode, node distance=1.25cm,] (C8) [right of= C7] Large c8;
      node[squarednode, node distance=1.25cm,] (C9) [right of= C8] Large c9;
      %
      node[squarednode] (C10) [right of= M] Large c10;

      %%
      node[circle, minimum size=0.5mm, fill=black!40, node distance=5cm, yshift=-0.25cm, inner sep=0pt] (E0) [right of= C6] ;



      %Lines
      draw[-,line width=0.5mm,] (A) -- (B);
      draw[-,line width=0.5mm] (B) -- (C);
      draw[-,line width=0.5mm,] (C) -- (D);
      %
      draw[loosely dotted,line width=0.65mm] (D) -- (M);

      draw [dashed,black,line width=0.5mm,] (A.west) to [out=210,in=140] (C.west);
      draw [dashed,black,line width=0.5mm,] (B.west) to [out=210,in=140] (D.west);

      %%%%%%%%%%%%%
      % From X to carts
      draw [->[scale=1.5], red,line width=0.5mm,] (E0.north) to [out=90,in=0] (C3.east);
      draw [->[scale=1.5], red,line width=0.5mm,] (E0.north) to [out=120,in=0] (C4.east);
      draw [->[scale=1.5], red,line width=0.5mm,] (E0.west) to [out=165,in=0] (C6.east);
      draw [->[scale=1.5], red,line width=0.5mm,] (E0.south) to [out=235,in=0] (C9.east);
      draw [->[scale=1.5], red,line width=0.5mm,] (E0.south) to [out=270,in=0] (C10.east);

      %%%%
      %% MORE CARTS
      node[squarednode, node distance=0.75cm, outer sep = 0.20cm] (E1) [right of= E0] Large c11;
      node[squarednode, node distance=1.50cm, outer sep = 0.20cm] (E2) [right of= E1] Large c12;
      node[squarednode, node distance=2.00cm, outer sep = 0.20cm] (E3) [right of= E2] Large c13;

      %% lines dotted
      draw[-, red, loosely dotted, line width=0.65mm,] (E1) -- (E2);
      draw[-, red, loosely dotted, line width=0.65mm,] (E2) -- (E3);
      %
      node[yshift=-1.25cm, xshift= 0.25cm] (T1) [above of =E2] $lambda$ arrivals per second;

      %%%%%
      % LEGEND
      node[squarednode, yshift=-1cm, xshift=-0.5cm] (L11) [below of= E2] C;
      node[yshift=1.25cm,] (L12) [below of= L11] Shopping\Cart;
      %
      node[roundnode, ] (L21) [right of= L11] ;
      node[yshift=1.25cm,] (L22) [below of= L21] Shop\Paypoint;

      endtikzpicture

      enddocument


      enter image description here



      I would like to replace each of the red square nodes by a shopping cart tikzpicture (no text is needed inside the cart):



      documentclass[border=1mm]standalone
      usepackageamsmath
      usepackagepgf,tikz,pgfplots
      pgfplotssetcompat=1.15
      usetikzlibraryarrows

      begindocument
      % definecolorzzttqqrgb0.6,0.2,0
      % definecolorududffrgb0.3,0.3,1

      begintikzpicture[line cap=round,line join=round,>=triangle 45]
      % draw[help lines,step=] (-3,-1) grid (3,7);
      filldraw[line width=2pt,color=purple,fill=brown!30]
      (-2.58,4.28) -- (-2.30,2.93) -- (0.59,2.67) -- (1.11,4.39) -- cycle;
      draw [line width=2pt] (-2.40,2.16)-- (0.84,2.16);
      draw [line width=2pt] (0.84,2.16)-- (0.59,2.67);
      draw [line width=2pt] (1.11,4.39)-- (1.39,4.78);
      draw [line width=2pt] (1.39,4.78)-- (1.72,4.78);
      draw [line width=2.8pt] (-2.17,1.78) circle (0.25cm);
      draw [line width=2.8pt] (0.43,1.78) circle (0.25cm);
      endtikzpicture

      enddocument


      enter image description here



      with the cart scaled to similar size of the square red nodes.



      How can I replace the square nodes by carts? (e.g. c1, c2 and c3 will be three carts at the right of node 1).










      share|improve this question









      New contributor



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











      In this figure,



      documentclass[border=1mm]standalone
      usepackageamsmath
      usepackagetikz,pgfplots
      pgfplotssetwidth=11cm,compat=1.15
      usetikzlibrarypositioning %<<<<----OJO
      usetikzlibraryarrows.meta,calc,decorations.markings,math,arrows.meta

      begindocument

      begintikzpicture[
      roundnode/.style=circle, draw=black!60, fill=green!5, minimum size=8.5mm, line width=1.5mm,
      squarednode/.style=rectangle, draw=red!60, fill=red!5, minimum size=7mm,
      align=center,node distance=2.25cm,
      scale=4,
      % every node/.style=scale=4,
      every node/.style=transform shape
      ]
      %Nodes
      node[roundnode] (A) Large 1;
      node[roundnode] (B) [below of =A] Large 2;
      node[roundnode] (C) [below of= B] Large 3;
      node[roundnode] (D) [below of= C] Large 4;
      node[roundnode, node distance=2.75cm,] (M) [below of= D] Large $m$;
      %%%

      %% CARTS
      node[squarednode] (C1) [right of= A] Large c1;
      node[squarednode, node distance=1.25cm,] (C2) [right of= C1] Large c2;
      node[squarednode, node distance=1.25cm,] (C3) [right of= C2] Large c3;
      %
      node[squarednode] (C4) [right of= B] Large c4;
      %
      node[squarednode] (C5) [right of= C] Large c5;
      node[squarednode, node distance=1.25cm,] (C6) [right of= C5] Large c6;
      %
      node[squarednode] (C7) [right of= D] Large c7;
      node[squarednode, node distance=1.25cm,] (C8) [right of= C7] Large c8;
      node[squarednode, node distance=1.25cm,] (C9) [right of= C8] Large c9;
      %
      node[squarednode] (C10) [right of= M] Large c10;

      %%
      node[circle, minimum size=0.5mm, fill=black!40, node distance=5cm, yshift=-0.25cm, inner sep=0pt] (E0) [right of= C6] ;



      %Lines
      draw[-,line width=0.5mm,] (A) -- (B);
      draw[-,line width=0.5mm] (B) -- (C);
      draw[-,line width=0.5mm,] (C) -- (D);
      %
      draw[loosely dotted,line width=0.65mm] (D) -- (M);

      draw [dashed,black,line width=0.5mm,] (A.west) to [out=210,in=140] (C.west);
      draw [dashed,black,line width=0.5mm,] (B.west) to [out=210,in=140] (D.west);

      %%%%%%%%%%%%%
      % From X to carts
      draw [->[scale=1.5], red,line width=0.5mm,] (E0.north) to [out=90,in=0] (C3.east);
      draw [->[scale=1.5], red,line width=0.5mm,] (E0.north) to [out=120,in=0] (C4.east);
      draw [->[scale=1.5], red,line width=0.5mm,] (E0.west) to [out=165,in=0] (C6.east);
      draw [->[scale=1.5], red,line width=0.5mm,] (E0.south) to [out=235,in=0] (C9.east);
      draw [->[scale=1.5], red,line width=0.5mm,] (E0.south) to [out=270,in=0] (C10.east);

      %%%%
      %% MORE CARTS
      node[squarednode, node distance=0.75cm, outer sep = 0.20cm] (E1) [right of= E0] Large c11;
      node[squarednode, node distance=1.50cm, outer sep = 0.20cm] (E2) [right of= E1] Large c12;
      node[squarednode, node distance=2.00cm, outer sep = 0.20cm] (E3) [right of= E2] Large c13;

      %% lines dotted
      draw[-, red, loosely dotted, line width=0.65mm,] (E1) -- (E2);
      draw[-, red, loosely dotted, line width=0.65mm,] (E2) -- (E3);
      %
      node[yshift=-1.25cm, xshift= 0.25cm] (T1) [above of =E2] $lambda$ arrivals per second;

      %%%%%
      % LEGEND
      node[squarednode, yshift=-1cm, xshift=-0.5cm] (L11) [below of= E2] C;
      node[yshift=1.25cm,] (L12) [below of= L11] Shopping\Cart;
      %
      node[roundnode, ] (L21) [right of= L11] ;
      node[yshift=1.25cm,] (L22) [below of= L21] Shop\Paypoint;

      endtikzpicture

      enddocument


      enter image description here



      I would like to replace each of the red square nodes by a shopping cart tikzpicture (no text is needed inside the cart):



      documentclass[border=1mm]standalone
      usepackageamsmath
      usepackagepgf,tikz,pgfplots
      pgfplotssetcompat=1.15
      usetikzlibraryarrows

      begindocument
      % definecolorzzttqqrgb0.6,0.2,0
      % definecolorududffrgb0.3,0.3,1

      begintikzpicture[line cap=round,line join=round,>=triangle 45]
      % draw[help lines,step=] (-3,-1) grid (3,7);
      filldraw[line width=2pt,color=purple,fill=brown!30]
      (-2.58,4.28) -- (-2.30,2.93) -- (0.59,2.67) -- (1.11,4.39) -- cycle;
      draw [line width=2pt] (-2.40,2.16)-- (0.84,2.16);
      draw [line width=2pt] (0.84,2.16)-- (0.59,2.67);
      draw [line width=2pt] (1.11,4.39)-- (1.39,4.78);
      draw [line width=2pt] (1.39,4.78)-- (1.72,4.78);
      draw [line width=2.8pt] (-2.17,1.78) circle (0.25cm);
      draw [line width=2.8pt] (0.43,1.78) circle (0.25cm);
      endtikzpicture

      enddocument


      enter image description here



      with the cart scaled to similar size of the square red nodes.



      How can I replace the square nodes by carts? (e.g. c1, c2 and c3 will be three carts at the right of node 1).







      tikz-pgf






      share|improve this question









      New contributor



      pablo 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



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








      share|improve this question




      share|improve this question








      edited 8 hours ago









      Stefan Pinnow

      21.7k9 gold badges38 silver badges81 bronze badges




      21.7k9 gold badges38 silver badges81 bronze badges






      New contributor



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








      asked 9 hours ago









      pablopablo

      435 bronze badges




      435 bronze badges




      New contributor



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




      New contributor




      pablo 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


















          4















          There are 2.5 methods to make a TikZ picture a node:



          1. Use path picture.

          2. Use a savebox.

          3. Use pics. This is strictly speaking not a node, hence "2.5" instead of 3 possibilities.

          Let's focus on option 2. Your cart gets stored in a savebox. It can be the content of the nodes, or you can make it a style using node contents. (In this case you need to be a bit more carful with the syntax, node (C1) [cart]; works but node[cart] (C1); doesn't.) Then there are several off-topic comments:



          • You were loading packages and libraries that you didn't use. I got rid of them.

          • You were loading positioning but not using it. Instead of right of=A use the positioning syntax right=of A or right=<distance> of A. This makes it much easier to arrange the nodes.

          • If you repeatedly use the same styles it is more convenient to use scopes.

          All this is to some extent done in the following MWE (which is not fully optimized, though):



          documentclass[border=1mm]standalone
          usepackageamsmath
          usepackagetikz
          usetikzlibrarypositioning,arrows.meta
          newsaveboxChart
          sboxChartbegintikzpicture[line cap=round,line join=round,scale=0.25]
          % draw[help lines,step=] (-3,-1) grid (3,7);
          pgfgettransformentriesmyatmptmptmptmptmp
          filldraw[line width=mya*2pt,color=purple,fill=brown!30]
          (-2.58,4.28) -- (-2.30,2.93) -- (0.59,2.67) -- (1.11,4.39) -- cycle;
          draw [line width=mya*2pt] (-2.40,2.16)-- (0.84,2.16);
          draw [line width=mya*2pt] (0.84,2.16)-- (0.59,2.67);
          draw [line width=mya*2pt] (1.11,4.39)-- (1.39,4.78);
          draw [line width=mya*2pt] (1.39,4.78)-- (1.72,4.78);
          draw [line width=mya*2.8pt] (-2.17,1.78) circle (0.25cm);
          draw [line width=mya*2.8pt] (0.43,1.78) circle (0.25cm);
          endtikzpicture
          begindocument

          begintikzpicture[>=Stealth,
          roundnode/.style=circle, draw=black!60, fill=green!5, minimum size=8.5mm, line width=1.5mm,
          squarednode/.style=rectangle, draw=red!60, fill=red!5, minimum size=7mm,
          align=center,node distance=2.25cm,
          scale=4,
          % every node/.style=scale=4,
          every node/.style=transform shape,
          cart/.style=node contents=useboxChart
          ]
          %Nodes
          node[roundnode] (A) Large 1;
          node[roundnode] (B) [below of =A] Large 2;
          node[roundnode] (C) [below=of B] Large 3;
          node[roundnode] (D) [below=of C] Large 4;
          node[roundnode, node distance=2.75cm,] (M) [below=of D] Large $m$;
          %%%

          %% CARTS
          beginscope[node distance=3mm,nodes=cart]
          node (C1) [right=of A];
          node (C2) [right=of C1];
          node (C3) [right=of C2];
          %
          node (C4) [right=of B];
          %
          node (C5) [right=of C];
          node (C6) [right=of C5];
          %
          node (C7) [right=of D];
          node (C8) [right=of C7];
          node (C9) [right=of C8];
          %
          node (C10) [right=of M];
          endscope
          %%
          node[circle, minimum size=0.5mm, fill=black!40, node distance=5cm, yshift=-0.25cm, inner sep=0pt] (E0) [right=of C6] ;



          %Lines
          draw[-,line width=0.5mm,] (A) -- (B);
          draw[-,line width=0.5mm] (B) -- (C);
          draw[-,line width=0.5mm,] (C) -- (D);
          %
          draw[loosely dotted,line width=0.65mm] (D) -- (M);

          draw [dashed,black,line width=0.5mm,] (A.west) to [out=210,in=140] (C.west);
          draw [dashed,black,line width=0.5mm,] (B.west) to [out=210,in=140] (D.west);

          %%%%%%%%%%%%%
          % From X to carts
          draw [->[scale=1.5], red,line width=0.5mm,] (E0.north) to [out=90,in=0] (C3.east);
          draw [->[scale=1.5], red,line width=0.5mm,] (E0.north) to [out=120,in=0] (C4.east);
          draw [->[scale=1.5], red,line width=0.5mm,] (E0.west) to [out=165,in=0] (C6.east);
          draw [->[scale=1.5], red,line width=0.5mm,] (E0.south) to [out=235,in=0] (C9.east);
          draw [->[scale=1.5], red,line width=0.5mm,] (E0.south) to [out=270,in=0] (C10.east);

          %%%%
          %% MORE CARTS
          beginscope[nodes=cart]
          node (E1) [right=3mm of E0];
          node (E2) [right=2mm of E1];
          node (E3) [right=5mm of E2];
          endscope
          %% lines dotted
          draw[-, red, loosely dotted, line width=0.65mm,] (E1) -- (E2);
          draw[-, red, loosely dotted, line width=0.65mm,] (E2) -- (E3);
          %
          node[yshift=-1.25cm, xshift= 0.25cm] (T1) [above=of E2] $lambda$ arrivals per second;

          %%%%%
          % LEGEND
          node (L11) [below left=1cm and 1mm of E2,cart];
          node[yshift=1.25cm,] (L12) [below=of L11] Shopping\Cart;
          %
          node[roundnode, ] (L21) [right=of L11] ;
          node[yshift=1.25cm,] (L22) [below=of L21] Shop\Paypoint;

          endtikzpicture
          enddocument


          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
            );



            );






            pablo 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%2f506591%2fhow-to-use-a-tikzpicture-as-a-node-shape%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









            4















            There are 2.5 methods to make a TikZ picture a node:



            1. Use path picture.

            2. Use a savebox.

            3. Use pics. This is strictly speaking not a node, hence "2.5" instead of 3 possibilities.

            Let's focus on option 2. Your cart gets stored in a savebox. It can be the content of the nodes, or you can make it a style using node contents. (In this case you need to be a bit more carful with the syntax, node (C1) [cart]; works but node[cart] (C1); doesn't.) Then there are several off-topic comments:



            • You were loading packages and libraries that you didn't use. I got rid of them.

            • You were loading positioning but not using it. Instead of right of=A use the positioning syntax right=of A or right=<distance> of A. This makes it much easier to arrange the nodes.

            • If you repeatedly use the same styles it is more convenient to use scopes.

            All this is to some extent done in the following MWE (which is not fully optimized, though):



            documentclass[border=1mm]standalone
            usepackageamsmath
            usepackagetikz
            usetikzlibrarypositioning,arrows.meta
            newsaveboxChart
            sboxChartbegintikzpicture[line cap=round,line join=round,scale=0.25]
            % draw[help lines,step=] (-3,-1) grid (3,7);
            pgfgettransformentriesmyatmptmptmptmptmp
            filldraw[line width=mya*2pt,color=purple,fill=brown!30]
            (-2.58,4.28) -- (-2.30,2.93) -- (0.59,2.67) -- (1.11,4.39) -- cycle;
            draw [line width=mya*2pt] (-2.40,2.16)-- (0.84,2.16);
            draw [line width=mya*2pt] (0.84,2.16)-- (0.59,2.67);
            draw [line width=mya*2pt] (1.11,4.39)-- (1.39,4.78);
            draw [line width=mya*2pt] (1.39,4.78)-- (1.72,4.78);
            draw [line width=mya*2.8pt] (-2.17,1.78) circle (0.25cm);
            draw [line width=mya*2.8pt] (0.43,1.78) circle (0.25cm);
            endtikzpicture
            begindocument

            begintikzpicture[>=Stealth,
            roundnode/.style=circle, draw=black!60, fill=green!5, minimum size=8.5mm, line width=1.5mm,
            squarednode/.style=rectangle, draw=red!60, fill=red!5, minimum size=7mm,
            align=center,node distance=2.25cm,
            scale=4,
            % every node/.style=scale=4,
            every node/.style=transform shape,
            cart/.style=node contents=useboxChart
            ]
            %Nodes
            node[roundnode] (A) Large 1;
            node[roundnode] (B) [below of =A] Large 2;
            node[roundnode] (C) [below=of B] Large 3;
            node[roundnode] (D) [below=of C] Large 4;
            node[roundnode, node distance=2.75cm,] (M) [below=of D] Large $m$;
            %%%

            %% CARTS
            beginscope[node distance=3mm,nodes=cart]
            node (C1) [right=of A];
            node (C2) [right=of C1];
            node (C3) [right=of C2];
            %
            node (C4) [right=of B];
            %
            node (C5) [right=of C];
            node (C6) [right=of C5];
            %
            node (C7) [right=of D];
            node (C8) [right=of C7];
            node (C9) [right=of C8];
            %
            node (C10) [right=of M];
            endscope
            %%
            node[circle, minimum size=0.5mm, fill=black!40, node distance=5cm, yshift=-0.25cm, inner sep=0pt] (E0) [right=of C6] ;



            %Lines
            draw[-,line width=0.5mm,] (A) -- (B);
            draw[-,line width=0.5mm] (B) -- (C);
            draw[-,line width=0.5mm,] (C) -- (D);
            %
            draw[loosely dotted,line width=0.65mm] (D) -- (M);

            draw [dashed,black,line width=0.5mm,] (A.west) to [out=210,in=140] (C.west);
            draw [dashed,black,line width=0.5mm,] (B.west) to [out=210,in=140] (D.west);

            %%%%%%%%%%%%%
            % From X to carts
            draw [->[scale=1.5], red,line width=0.5mm,] (E0.north) to [out=90,in=0] (C3.east);
            draw [->[scale=1.5], red,line width=0.5mm,] (E0.north) to [out=120,in=0] (C4.east);
            draw [->[scale=1.5], red,line width=0.5mm,] (E0.west) to [out=165,in=0] (C6.east);
            draw [->[scale=1.5], red,line width=0.5mm,] (E0.south) to [out=235,in=0] (C9.east);
            draw [->[scale=1.5], red,line width=0.5mm,] (E0.south) to [out=270,in=0] (C10.east);

            %%%%
            %% MORE CARTS
            beginscope[nodes=cart]
            node (E1) [right=3mm of E0];
            node (E2) [right=2mm of E1];
            node (E3) [right=5mm of E2];
            endscope
            %% lines dotted
            draw[-, red, loosely dotted, line width=0.65mm,] (E1) -- (E2);
            draw[-, red, loosely dotted, line width=0.65mm,] (E2) -- (E3);
            %
            node[yshift=-1.25cm, xshift= 0.25cm] (T1) [above=of E2] $lambda$ arrivals per second;

            %%%%%
            % LEGEND
            node (L11) [below left=1cm and 1mm of E2,cart];
            node[yshift=1.25cm,] (L12) [below=of L11] Shopping\Cart;
            %
            node[roundnode, ] (L21) [right=of L11] ;
            node[yshift=1.25cm,] (L22) [below=of L21] Shop\Paypoint;

            endtikzpicture
            enddocument


            enter image description here






            share|improve this answer































              4















              There are 2.5 methods to make a TikZ picture a node:



              1. Use path picture.

              2. Use a savebox.

              3. Use pics. This is strictly speaking not a node, hence "2.5" instead of 3 possibilities.

              Let's focus on option 2. Your cart gets stored in a savebox. It can be the content of the nodes, or you can make it a style using node contents. (In this case you need to be a bit more carful with the syntax, node (C1) [cart]; works but node[cart] (C1); doesn't.) Then there are several off-topic comments:



              • You were loading packages and libraries that you didn't use. I got rid of them.

              • You were loading positioning but not using it. Instead of right of=A use the positioning syntax right=of A or right=<distance> of A. This makes it much easier to arrange the nodes.

              • If you repeatedly use the same styles it is more convenient to use scopes.

              All this is to some extent done in the following MWE (which is not fully optimized, though):



              documentclass[border=1mm]standalone
              usepackageamsmath
              usepackagetikz
              usetikzlibrarypositioning,arrows.meta
              newsaveboxChart
              sboxChartbegintikzpicture[line cap=round,line join=round,scale=0.25]
              % draw[help lines,step=] (-3,-1) grid (3,7);
              pgfgettransformentriesmyatmptmptmptmptmp
              filldraw[line width=mya*2pt,color=purple,fill=brown!30]
              (-2.58,4.28) -- (-2.30,2.93) -- (0.59,2.67) -- (1.11,4.39) -- cycle;
              draw [line width=mya*2pt] (-2.40,2.16)-- (0.84,2.16);
              draw [line width=mya*2pt] (0.84,2.16)-- (0.59,2.67);
              draw [line width=mya*2pt] (1.11,4.39)-- (1.39,4.78);
              draw [line width=mya*2pt] (1.39,4.78)-- (1.72,4.78);
              draw [line width=mya*2.8pt] (-2.17,1.78) circle (0.25cm);
              draw [line width=mya*2.8pt] (0.43,1.78) circle (0.25cm);
              endtikzpicture
              begindocument

              begintikzpicture[>=Stealth,
              roundnode/.style=circle, draw=black!60, fill=green!5, minimum size=8.5mm, line width=1.5mm,
              squarednode/.style=rectangle, draw=red!60, fill=red!5, minimum size=7mm,
              align=center,node distance=2.25cm,
              scale=4,
              % every node/.style=scale=4,
              every node/.style=transform shape,
              cart/.style=node contents=useboxChart
              ]
              %Nodes
              node[roundnode] (A) Large 1;
              node[roundnode] (B) [below of =A] Large 2;
              node[roundnode] (C) [below=of B] Large 3;
              node[roundnode] (D) [below=of C] Large 4;
              node[roundnode, node distance=2.75cm,] (M) [below=of D] Large $m$;
              %%%

              %% CARTS
              beginscope[node distance=3mm,nodes=cart]
              node (C1) [right=of A];
              node (C2) [right=of C1];
              node (C3) [right=of C2];
              %
              node (C4) [right=of B];
              %
              node (C5) [right=of C];
              node (C6) [right=of C5];
              %
              node (C7) [right=of D];
              node (C8) [right=of C7];
              node (C9) [right=of C8];
              %
              node (C10) [right=of M];
              endscope
              %%
              node[circle, minimum size=0.5mm, fill=black!40, node distance=5cm, yshift=-0.25cm, inner sep=0pt] (E0) [right=of C6] ;



              %Lines
              draw[-,line width=0.5mm,] (A) -- (B);
              draw[-,line width=0.5mm] (B) -- (C);
              draw[-,line width=0.5mm,] (C) -- (D);
              %
              draw[loosely dotted,line width=0.65mm] (D) -- (M);

              draw [dashed,black,line width=0.5mm,] (A.west) to [out=210,in=140] (C.west);
              draw [dashed,black,line width=0.5mm,] (B.west) to [out=210,in=140] (D.west);

              %%%%%%%%%%%%%
              % From X to carts
              draw [->[scale=1.5], red,line width=0.5mm,] (E0.north) to [out=90,in=0] (C3.east);
              draw [->[scale=1.5], red,line width=0.5mm,] (E0.north) to [out=120,in=0] (C4.east);
              draw [->[scale=1.5], red,line width=0.5mm,] (E0.west) to [out=165,in=0] (C6.east);
              draw [->[scale=1.5], red,line width=0.5mm,] (E0.south) to [out=235,in=0] (C9.east);
              draw [->[scale=1.5], red,line width=0.5mm,] (E0.south) to [out=270,in=0] (C10.east);

              %%%%
              %% MORE CARTS
              beginscope[nodes=cart]
              node (E1) [right=3mm of E0];
              node (E2) [right=2mm of E1];
              node (E3) [right=5mm of E2];
              endscope
              %% lines dotted
              draw[-, red, loosely dotted, line width=0.65mm,] (E1) -- (E2);
              draw[-, red, loosely dotted, line width=0.65mm,] (E2) -- (E3);
              %
              node[yshift=-1.25cm, xshift= 0.25cm] (T1) [above=of E2] $lambda$ arrivals per second;

              %%%%%
              % LEGEND
              node (L11) [below left=1cm and 1mm of E2,cart];
              node[yshift=1.25cm,] (L12) [below=of L11] Shopping\Cart;
              %
              node[roundnode, ] (L21) [right=of L11] ;
              node[yshift=1.25cm,] (L22) [below=of L21] Shop\Paypoint;

              endtikzpicture
              enddocument


              enter image description here






              share|improve this answer





























                4














                4










                4









                There are 2.5 methods to make a TikZ picture a node:



                1. Use path picture.

                2. Use a savebox.

                3. Use pics. This is strictly speaking not a node, hence "2.5" instead of 3 possibilities.

                Let's focus on option 2. Your cart gets stored in a savebox. It can be the content of the nodes, or you can make it a style using node contents. (In this case you need to be a bit more carful with the syntax, node (C1) [cart]; works but node[cart] (C1); doesn't.) Then there are several off-topic comments:



                • You were loading packages and libraries that you didn't use. I got rid of them.

                • You were loading positioning but not using it. Instead of right of=A use the positioning syntax right=of A or right=<distance> of A. This makes it much easier to arrange the nodes.

                • If you repeatedly use the same styles it is more convenient to use scopes.

                All this is to some extent done in the following MWE (which is not fully optimized, though):



                documentclass[border=1mm]standalone
                usepackageamsmath
                usepackagetikz
                usetikzlibrarypositioning,arrows.meta
                newsaveboxChart
                sboxChartbegintikzpicture[line cap=round,line join=round,scale=0.25]
                % draw[help lines,step=] (-3,-1) grid (3,7);
                pgfgettransformentriesmyatmptmptmptmptmp
                filldraw[line width=mya*2pt,color=purple,fill=brown!30]
                (-2.58,4.28) -- (-2.30,2.93) -- (0.59,2.67) -- (1.11,4.39) -- cycle;
                draw [line width=mya*2pt] (-2.40,2.16)-- (0.84,2.16);
                draw [line width=mya*2pt] (0.84,2.16)-- (0.59,2.67);
                draw [line width=mya*2pt] (1.11,4.39)-- (1.39,4.78);
                draw [line width=mya*2pt] (1.39,4.78)-- (1.72,4.78);
                draw [line width=mya*2.8pt] (-2.17,1.78) circle (0.25cm);
                draw [line width=mya*2.8pt] (0.43,1.78) circle (0.25cm);
                endtikzpicture
                begindocument

                begintikzpicture[>=Stealth,
                roundnode/.style=circle, draw=black!60, fill=green!5, minimum size=8.5mm, line width=1.5mm,
                squarednode/.style=rectangle, draw=red!60, fill=red!5, minimum size=7mm,
                align=center,node distance=2.25cm,
                scale=4,
                % every node/.style=scale=4,
                every node/.style=transform shape,
                cart/.style=node contents=useboxChart
                ]
                %Nodes
                node[roundnode] (A) Large 1;
                node[roundnode] (B) [below of =A] Large 2;
                node[roundnode] (C) [below=of B] Large 3;
                node[roundnode] (D) [below=of C] Large 4;
                node[roundnode, node distance=2.75cm,] (M) [below=of D] Large $m$;
                %%%

                %% CARTS
                beginscope[node distance=3mm,nodes=cart]
                node (C1) [right=of A];
                node (C2) [right=of C1];
                node (C3) [right=of C2];
                %
                node (C4) [right=of B];
                %
                node (C5) [right=of C];
                node (C6) [right=of C5];
                %
                node (C7) [right=of D];
                node (C8) [right=of C7];
                node (C9) [right=of C8];
                %
                node (C10) [right=of M];
                endscope
                %%
                node[circle, minimum size=0.5mm, fill=black!40, node distance=5cm, yshift=-0.25cm, inner sep=0pt] (E0) [right=of C6] ;



                %Lines
                draw[-,line width=0.5mm,] (A) -- (B);
                draw[-,line width=0.5mm] (B) -- (C);
                draw[-,line width=0.5mm,] (C) -- (D);
                %
                draw[loosely dotted,line width=0.65mm] (D) -- (M);

                draw [dashed,black,line width=0.5mm,] (A.west) to [out=210,in=140] (C.west);
                draw [dashed,black,line width=0.5mm,] (B.west) to [out=210,in=140] (D.west);

                %%%%%%%%%%%%%
                % From X to carts
                draw [->[scale=1.5], red,line width=0.5mm,] (E0.north) to [out=90,in=0] (C3.east);
                draw [->[scale=1.5], red,line width=0.5mm,] (E0.north) to [out=120,in=0] (C4.east);
                draw [->[scale=1.5], red,line width=0.5mm,] (E0.west) to [out=165,in=0] (C6.east);
                draw [->[scale=1.5], red,line width=0.5mm,] (E0.south) to [out=235,in=0] (C9.east);
                draw [->[scale=1.5], red,line width=0.5mm,] (E0.south) to [out=270,in=0] (C10.east);

                %%%%
                %% MORE CARTS
                beginscope[nodes=cart]
                node (E1) [right=3mm of E0];
                node (E2) [right=2mm of E1];
                node (E3) [right=5mm of E2];
                endscope
                %% lines dotted
                draw[-, red, loosely dotted, line width=0.65mm,] (E1) -- (E2);
                draw[-, red, loosely dotted, line width=0.65mm,] (E2) -- (E3);
                %
                node[yshift=-1.25cm, xshift= 0.25cm] (T1) [above=of E2] $lambda$ arrivals per second;

                %%%%%
                % LEGEND
                node (L11) [below left=1cm and 1mm of E2,cart];
                node[yshift=1.25cm,] (L12) [below=of L11] Shopping\Cart;
                %
                node[roundnode, ] (L21) [right=of L11] ;
                node[yshift=1.25cm,] (L22) [below=of L21] Shop\Paypoint;

                endtikzpicture
                enddocument


                enter image description here






                share|improve this answer















                There are 2.5 methods to make a TikZ picture a node:



                1. Use path picture.

                2. Use a savebox.

                3. Use pics. This is strictly speaking not a node, hence "2.5" instead of 3 possibilities.

                Let's focus on option 2. Your cart gets stored in a savebox. It can be the content of the nodes, or you can make it a style using node contents. (In this case you need to be a bit more carful with the syntax, node (C1) [cart]; works but node[cart] (C1); doesn't.) Then there are several off-topic comments:



                • You were loading packages and libraries that you didn't use. I got rid of them.

                • You were loading positioning but not using it. Instead of right of=A use the positioning syntax right=of A or right=<distance> of A. This makes it much easier to arrange the nodes.

                • If you repeatedly use the same styles it is more convenient to use scopes.

                All this is to some extent done in the following MWE (which is not fully optimized, though):



                documentclass[border=1mm]standalone
                usepackageamsmath
                usepackagetikz
                usetikzlibrarypositioning,arrows.meta
                newsaveboxChart
                sboxChartbegintikzpicture[line cap=round,line join=round,scale=0.25]
                % draw[help lines,step=] (-3,-1) grid (3,7);
                pgfgettransformentriesmyatmptmptmptmptmp
                filldraw[line width=mya*2pt,color=purple,fill=brown!30]
                (-2.58,4.28) -- (-2.30,2.93) -- (0.59,2.67) -- (1.11,4.39) -- cycle;
                draw [line width=mya*2pt] (-2.40,2.16)-- (0.84,2.16);
                draw [line width=mya*2pt] (0.84,2.16)-- (0.59,2.67);
                draw [line width=mya*2pt] (1.11,4.39)-- (1.39,4.78);
                draw [line width=mya*2pt] (1.39,4.78)-- (1.72,4.78);
                draw [line width=mya*2.8pt] (-2.17,1.78) circle (0.25cm);
                draw [line width=mya*2.8pt] (0.43,1.78) circle (0.25cm);
                endtikzpicture
                begindocument

                begintikzpicture[>=Stealth,
                roundnode/.style=circle, draw=black!60, fill=green!5, minimum size=8.5mm, line width=1.5mm,
                squarednode/.style=rectangle, draw=red!60, fill=red!5, minimum size=7mm,
                align=center,node distance=2.25cm,
                scale=4,
                % every node/.style=scale=4,
                every node/.style=transform shape,
                cart/.style=node contents=useboxChart
                ]
                %Nodes
                node[roundnode] (A) Large 1;
                node[roundnode] (B) [below of =A] Large 2;
                node[roundnode] (C) [below=of B] Large 3;
                node[roundnode] (D) [below=of C] Large 4;
                node[roundnode, node distance=2.75cm,] (M) [below=of D] Large $m$;
                %%%

                %% CARTS
                beginscope[node distance=3mm,nodes=cart]
                node (C1) [right=of A];
                node (C2) [right=of C1];
                node (C3) [right=of C2];
                %
                node (C4) [right=of B];
                %
                node (C5) [right=of C];
                node (C6) [right=of C5];
                %
                node (C7) [right=of D];
                node (C8) [right=of C7];
                node (C9) [right=of C8];
                %
                node (C10) [right=of M];
                endscope
                %%
                node[circle, minimum size=0.5mm, fill=black!40, node distance=5cm, yshift=-0.25cm, inner sep=0pt] (E0) [right=of C6] ;



                %Lines
                draw[-,line width=0.5mm,] (A) -- (B);
                draw[-,line width=0.5mm] (B) -- (C);
                draw[-,line width=0.5mm,] (C) -- (D);
                %
                draw[loosely dotted,line width=0.65mm] (D) -- (M);

                draw [dashed,black,line width=0.5mm,] (A.west) to [out=210,in=140] (C.west);
                draw [dashed,black,line width=0.5mm,] (B.west) to [out=210,in=140] (D.west);

                %%%%%%%%%%%%%
                % From X to carts
                draw [->[scale=1.5], red,line width=0.5mm,] (E0.north) to [out=90,in=0] (C3.east);
                draw [->[scale=1.5], red,line width=0.5mm,] (E0.north) to [out=120,in=0] (C4.east);
                draw [->[scale=1.5], red,line width=0.5mm,] (E0.west) to [out=165,in=0] (C6.east);
                draw [->[scale=1.5], red,line width=0.5mm,] (E0.south) to [out=235,in=0] (C9.east);
                draw [->[scale=1.5], red,line width=0.5mm,] (E0.south) to [out=270,in=0] (C10.east);

                %%%%
                %% MORE CARTS
                beginscope[nodes=cart]
                node (E1) [right=3mm of E0];
                node (E2) [right=2mm of E1];
                node (E3) [right=5mm of E2];
                endscope
                %% lines dotted
                draw[-, red, loosely dotted, line width=0.65mm,] (E1) -- (E2);
                draw[-, red, loosely dotted, line width=0.65mm,] (E2) -- (E3);
                %
                node[yshift=-1.25cm, xshift= 0.25cm] (T1) [above=of E2] $lambda$ arrivals per second;

                %%%%%
                % LEGEND
                node (L11) [below left=1cm and 1mm of E2,cart];
                node[yshift=1.25cm,] (L12) [below=of L11] Shopping\Cart;
                %
                node[roundnode, ] (L21) [right=of L11] ;
                node[yshift=1.25cm,] (L22) [below=of L21] Shop\Paypoint;

                endtikzpicture
                enddocument


                enter image description here







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 4 hours ago

























                answered 8 hours ago









                Schrödinger's catSchrödinger's cat

                3,9116 silver badges16 bronze badges




                3,9116 silver badges16 bronze badges























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









                    draft saved

                    draft discarded


















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












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











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














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


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

                    But avoid


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

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

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




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f506591%2fhow-to-use-a-tikzpicture-as-a-node-shape%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

                    Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                    Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                    199年 目錄 大件事 到箇年出世嗰人 到箇年死嗰人 節慶、風俗習慣 導覽選單