How can I have 2 plots side by side such that I can show a line going from one to the other?
up vote
2
down vote
favorite
Here's a quick visual link to what I want to show,
https://www.youtube.com/watch?v=rVvGqWyQB_0&index=2&list=PL5563BAB9EA968641
at 6:09.
I've tried using minipages but that won't allow for a line to go from one plot to the other and here is the code for one of the plots,
begin{tikzpicture}
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node{$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25) ;
end{axis}
end{tikzpicture}
tikz-pgf
add a comment |
up vote
2
down vote
favorite
Here's a quick visual link to what I want to show,
https://www.youtube.com/watch?v=rVvGqWyQB_0&index=2&list=PL5563BAB9EA968641
at 6:09.
I've tried using minipages but that won't allow for a line to go from one plot to the other and here is the code for one of the plots,
begin{tikzpicture}
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node{$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25) ;
end{axis}
end{tikzpicture}
tikz-pgf
I'll add it sorry.
– John Miller
Nov 28 at 20:45
1
You can have multipleaxis
environments in the sametikzpicture
, placed at different locations with theat
key. See for example tex.stackexchange.com/questions/289079/2x2-array-of-pgf-plots/…
– Torbjørn T.
Nov 28 at 20:58
In addition to what @TorbjørnT. is saying, you could useremember picture
to remember the coordinates in a given picture. You can then access them withoverlay,remember picture
in a separate picture.
– marmot
Nov 28 at 21:08
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Here's a quick visual link to what I want to show,
https://www.youtube.com/watch?v=rVvGqWyQB_0&index=2&list=PL5563BAB9EA968641
at 6:09.
I've tried using minipages but that won't allow for a line to go from one plot to the other and here is the code for one of the plots,
begin{tikzpicture}
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node{$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25) ;
end{axis}
end{tikzpicture}
tikz-pgf
Here's a quick visual link to what I want to show,
https://www.youtube.com/watch?v=rVvGqWyQB_0&index=2&list=PL5563BAB9EA968641
at 6:09.
I've tried using minipages but that won't allow for a line to go from one plot to the other and here is the code for one of the plots,
begin{tikzpicture}
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node{$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25) ;
end{axis}
end{tikzpicture}
tikz-pgf
tikz-pgf
edited Nov 28 at 20:47
asked Nov 28 at 20:39
John Miller
133
133
I'll add it sorry.
– John Miller
Nov 28 at 20:45
1
You can have multipleaxis
environments in the sametikzpicture
, placed at different locations with theat
key. See for example tex.stackexchange.com/questions/289079/2x2-array-of-pgf-plots/…
– Torbjørn T.
Nov 28 at 20:58
In addition to what @TorbjørnT. is saying, you could useremember picture
to remember the coordinates in a given picture. You can then access them withoverlay,remember picture
in a separate picture.
– marmot
Nov 28 at 21:08
add a comment |
I'll add it sorry.
– John Miller
Nov 28 at 20:45
1
You can have multipleaxis
environments in the sametikzpicture
, placed at different locations with theat
key. See for example tex.stackexchange.com/questions/289079/2x2-array-of-pgf-plots/…
– Torbjørn T.
Nov 28 at 20:58
In addition to what @TorbjørnT. is saying, you could useremember picture
to remember the coordinates in a given picture. You can then access them withoverlay,remember picture
in a separate picture.
– marmot
Nov 28 at 21:08
I'll add it sorry.
– John Miller
Nov 28 at 20:45
I'll add it sorry.
– John Miller
Nov 28 at 20:45
1
1
You can have multiple
axis
environments in the same tikzpicture
, placed at different locations with the at
key. See for example tex.stackexchange.com/questions/289079/2x2-array-of-pgf-plots/…– Torbjørn T.
Nov 28 at 20:58
You can have multiple
axis
environments in the same tikzpicture
, placed at different locations with the at
key. See for example tex.stackexchange.com/questions/289079/2x2-array-of-pgf-plots/…– Torbjørn T.
Nov 28 at 20:58
In addition to what @TorbjørnT. is saying, you could use
remember picture
to remember the coordinates in a given picture. You can then access them with overlay,remember picture
in a separate picture.– marmot
Nov 28 at 21:08
In addition to what @TorbjørnT. is saying, you could use
remember picture
to remember the coordinates in a given picture. You can then access them with overlay,remember picture
in a separate picture.– marmot
Nov 28 at 21:08
add a comment |
2 Answers
2
active
oldest
votes
up vote
2
down vote
accepted
It is possible to create several axis
environments and shift them with xshift
.
Then, simply draw an arrow from one to the other.
documentclass{article}
usepackage{tikz,pgfplots}
begin{document}
begin{tikzpicture}
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node (a) {$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25) ;
end{axis}
begin{axis}[ xshift=7cm,
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node(b){$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25) ;
end{axis}
draw[->](a)to[bend left](b);
end{tikzpicture}
end{document}
Thank you I did not know of the xshift command before.
– John Miller
Nov 28 at 21:18
pgfploots
is based ontikz
, so it load it , i.e it is necessary to loadtikz
again. forpgfplots
is fine to defined used version. for example after1.11
you can write coordinates in diagram as(1.25,1.25)
.
– Zarko
Nov 28 at 21:19
add a comment |
up vote
2
down vote
In the video it seems that the points also get accessed from outside, which means you might need remember picture
anyway.
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usetikzlibrary{tikzmark}
begin{document}
begin{figure}[htb]
centering
begin{tikzpicture}[remember picture]
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node{$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25)
coordinate(d1);
end{axis}
end{tikzpicture}
quad
begin{tikzpicture}[remember picture]
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node{$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, right] {$delta$}
(axis cs:1.25,0.75) coordinate(d2);
end{axis}
end{tikzpicture}
caption{On the left, our point is on the
tikzmarknode{D1}{right} while it is on the tikzmarknode{D2}{bottom} in the
right figure. }
begin{tikzpicture}[overlay,remember picture]
draw[red,-latex] (D1) to[out=90,in=-90] (d1);
draw[red,-latex] (D2) to[out=90,in=-90] (d2);
draw[red,-latex] (d1) to[out=0,in=180] node[midway,above,sloped,fill=white,fill
opacity=0.6]{has moved}(d2);
end{tikzpicture}
end{figure}
end{document}
1
Well I didn't even know you could do this but thank you so much I think this will explain the point I'm trying to make very well.
– John Miller
Nov 28 at 21:35
1
@JohnMiller I think the marmot finally found the crystal ball... Did you asked him?
– manooooh
Nov 29 at 1:26
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
It is possible to create several axis
environments and shift them with xshift
.
Then, simply draw an arrow from one to the other.
documentclass{article}
usepackage{tikz,pgfplots}
begin{document}
begin{tikzpicture}
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node (a) {$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25) ;
end{axis}
begin{axis}[ xshift=7cm,
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node(b){$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25) ;
end{axis}
draw[->](a)to[bend left](b);
end{tikzpicture}
end{document}
Thank you I did not know of the xshift command before.
– John Miller
Nov 28 at 21:18
pgfploots
is based ontikz
, so it load it , i.e it is necessary to loadtikz
again. forpgfplots
is fine to defined used version. for example after1.11
you can write coordinates in diagram as(1.25,1.25)
.
– Zarko
Nov 28 at 21:19
add a comment |
up vote
2
down vote
accepted
It is possible to create several axis
environments and shift them with xshift
.
Then, simply draw an arrow from one to the other.
documentclass{article}
usepackage{tikz,pgfplots}
begin{document}
begin{tikzpicture}
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node (a) {$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25) ;
end{axis}
begin{axis}[ xshift=7cm,
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node(b){$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25) ;
end{axis}
draw[->](a)to[bend left](b);
end{tikzpicture}
end{document}
Thank you I did not know of the xshift command before.
– John Miller
Nov 28 at 21:18
pgfploots
is based ontikz
, so it load it , i.e it is necessary to loadtikz
again. forpgfplots
is fine to defined used version. for example after1.11
you can write coordinates in diagram as(1.25,1.25)
.
– Zarko
Nov 28 at 21:19
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
It is possible to create several axis
environments and shift them with xshift
.
Then, simply draw an arrow from one to the other.
documentclass{article}
usepackage{tikz,pgfplots}
begin{document}
begin{tikzpicture}
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node (a) {$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25) ;
end{axis}
begin{axis}[ xshift=7cm,
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node(b){$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25) ;
end{axis}
draw[->](a)to[bend left](b);
end{tikzpicture}
end{document}
It is possible to create several axis
environments and shift them with xshift
.
Then, simply draw an arrow from one to the other.
documentclass{article}
usepackage{tikz,pgfplots}
begin{document}
begin{tikzpicture}
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node (a) {$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25) ;
end{axis}
begin{axis}[ xshift=7cm,
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node(b){$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25) ;
end{axis}
draw[->](a)to[bend left](b);
end{tikzpicture}
end{document}
answered Nov 28 at 21:10
AndréC
6,77211140
6,77211140
Thank you I did not know of the xshift command before.
– John Miller
Nov 28 at 21:18
pgfploots
is based ontikz
, so it load it , i.e it is necessary to loadtikz
again. forpgfplots
is fine to defined used version. for example after1.11
you can write coordinates in diagram as(1.25,1.25)
.
– Zarko
Nov 28 at 21:19
add a comment |
Thank you I did not know of the xshift command before.
– John Miller
Nov 28 at 21:18
pgfploots
is based ontikz
, so it load it , i.e it is necessary to loadtikz
again. forpgfplots
is fine to defined used version. for example after1.11
you can write coordinates in diagram as(1.25,1.25)
.
– Zarko
Nov 28 at 21:19
Thank you I did not know of the xshift command before.
– John Miller
Nov 28 at 21:18
Thank you I did not know of the xshift command before.
– John Miller
Nov 28 at 21:18
pgfploots
is based on tikz
, so it load it , i.e it is necessary to load tikz
again. for pgfplots
is fine to defined used version. for example after 1.11
you can write coordinates in diagram as (1.25,1.25)
.– Zarko
Nov 28 at 21:19
pgfploots
is based on tikz
, so it load it , i.e it is necessary to load tikz
again. for pgfplots
is fine to defined used version. for example after 1.11
you can write coordinates in diagram as (1.25,1.25)
.– Zarko
Nov 28 at 21:19
add a comment |
up vote
2
down vote
In the video it seems that the points also get accessed from outside, which means you might need remember picture
anyway.
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usetikzlibrary{tikzmark}
begin{document}
begin{figure}[htb]
centering
begin{tikzpicture}[remember picture]
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node{$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25)
coordinate(d1);
end{axis}
end{tikzpicture}
quad
begin{tikzpicture}[remember picture]
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node{$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, right] {$delta$}
(axis cs:1.25,0.75) coordinate(d2);
end{axis}
end{tikzpicture}
caption{On the left, our point is on the
tikzmarknode{D1}{right} while it is on the tikzmarknode{D2}{bottom} in the
right figure. }
begin{tikzpicture}[overlay,remember picture]
draw[red,-latex] (D1) to[out=90,in=-90] (d1);
draw[red,-latex] (D2) to[out=90,in=-90] (d2);
draw[red,-latex] (d1) to[out=0,in=180] node[midway,above,sloped,fill=white,fill
opacity=0.6]{has moved}(d2);
end{tikzpicture}
end{figure}
end{document}
1
Well I didn't even know you could do this but thank you so much I think this will explain the point I'm trying to make very well.
– John Miller
Nov 28 at 21:35
1
@JohnMiller I think the marmot finally found the crystal ball... Did you asked him?
– manooooh
Nov 29 at 1:26
add a comment |
up vote
2
down vote
In the video it seems that the points also get accessed from outside, which means you might need remember picture
anyway.
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usetikzlibrary{tikzmark}
begin{document}
begin{figure}[htb]
centering
begin{tikzpicture}[remember picture]
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node{$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25)
coordinate(d1);
end{axis}
end{tikzpicture}
quad
begin{tikzpicture}[remember picture]
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node{$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, right] {$delta$}
(axis cs:1.25,0.75) coordinate(d2);
end{axis}
end{tikzpicture}
caption{On the left, our point is on the
tikzmarknode{D1}{right} while it is on the tikzmarknode{D2}{bottom} in the
right figure. }
begin{tikzpicture}[overlay,remember picture]
draw[red,-latex] (D1) to[out=90,in=-90] (d1);
draw[red,-latex] (D2) to[out=90,in=-90] (d2);
draw[red,-latex] (d1) to[out=0,in=180] node[midway,above,sloped,fill=white,fill
opacity=0.6]{has moved}(d2);
end{tikzpicture}
end{figure}
end{document}
1
Well I didn't even know you could do this but thank you so much I think this will explain the point I'm trying to make very well.
– John Miller
Nov 28 at 21:35
1
@JohnMiller I think the marmot finally found the crystal ball... Did you asked him?
– manooooh
Nov 29 at 1:26
add a comment |
up vote
2
down vote
up vote
2
down vote
In the video it seems that the points also get accessed from outside, which means you might need remember picture
anyway.
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usetikzlibrary{tikzmark}
begin{document}
begin{figure}[htb]
centering
begin{tikzpicture}[remember picture]
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node{$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25)
coordinate(d1);
end{axis}
end{tikzpicture}
quad
begin{tikzpicture}[remember picture]
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node{$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, right] {$delta$}
(axis cs:1.25,0.75) coordinate(d2);
end{axis}
end{tikzpicture}
caption{On the left, our point is on the
tikzmarknode{D1}{right} while it is on the tikzmarknode{D2}{bottom} in the
right figure. }
begin{tikzpicture}[overlay,remember picture]
draw[red,-latex] (D1) to[out=90,in=-90] (d1);
draw[red,-latex] (D2) to[out=90,in=-90] (d2);
draw[red,-latex] (d1) to[out=0,in=180] node[midway,above,sloped,fill=white,fill
opacity=0.6]{has moved}(d2);
end{tikzpicture}
end{figure}
end{document}
In the video it seems that the points also get accessed from outside, which means you might need remember picture
anyway.
documentclass{article}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usetikzlibrary{tikzmark}
begin{document}
begin{figure}[htb]
centering
begin{tikzpicture}[remember picture]
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node{$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, below] {$delta$} (axis cs:1.75,1.25)
coordinate(d1);
end{axis}
end{tikzpicture}
quad
begin{tikzpicture}[remember picture]
begin{axis}[
ticks=none,
axis lines = middle,
axis line style={->},
ymin=-0.5, ymax = 2.5,
xmin=-0.5, xmax=2.5,
xlabel={$x$},
ylabel={$y$},
axis equal image
]
draw (axis cs:1.25,1.25) circle [blue, radius=0.5];
draw[color=blue] (axis cs:1.25,1.25) node[above left] {$a$};
draw[color=blue] (axis cs:1.25,1.25) node{$bullet$};
draw [->] (axis cs:1.25,1.25) -- node[pos = 0.5, right] {$delta$}
(axis cs:1.25,0.75) coordinate(d2);
end{axis}
end{tikzpicture}
caption{On the left, our point is on the
tikzmarknode{D1}{right} while it is on the tikzmarknode{D2}{bottom} in the
right figure. }
begin{tikzpicture}[overlay,remember picture]
draw[red,-latex] (D1) to[out=90,in=-90] (d1);
draw[red,-latex] (D2) to[out=90,in=-90] (d2);
draw[red,-latex] (d1) to[out=0,in=180] node[midway,above,sloped,fill=white,fill
opacity=0.6]{has moved}(d2);
end{tikzpicture}
end{figure}
end{document}
answered Nov 28 at 21:19
marmot
81k491173
81k491173
1
Well I didn't even know you could do this but thank you so much I think this will explain the point I'm trying to make very well.
– John Miller
Nov 28 at 21:35
1
@JohnMiller I think the marmot finally found the crystal ball... Did you asked him?
– manooooh
Nov 29 at 1:26
add a comment |
1
Well I didn't even know you could do this but thank you so much I think this will explain the point I'm trying to make very well.
– John Miller
Nov 28 at 21:35
1
@JohnMiller I think the marmot finally found the crystal ball... Did you asked him?
– manooooh
Nov 29 at 1:26
1
1
Well I didn't even know you could do this but thank you so much I think this will explain the point I'm trying to make very well.
– John Miller
Nov 28 at 21:35
Well I didn't even know you could do this but thank you so much I think this will explain the point I'm trying to make very well.
– John Miller
Nov 28 at 21:35
1
1
@JohnMiller I think the marmot finally found the crystal ball... Did you asked him?
– manooooh
Nov 29 at 1:26
@JohnMiller I think the marmot finally found the crystal ball... Did you asked him?
– manooooh
Nov 29 at 1:26
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462249%2fhow-can-i-have-2-plots-side-by-side-such-that-i-can-show-a-line-going-from-one-t%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
I'll add it sorry.
– John Miller
Nov 28 at 20:45
1
You can have multiple
axis
environments in the sametikzpicture
, placed at different locations with theat
key. See for example tex.stackexchange.com/questions/289079/2x2-array-of-pgf-plots/…– Torbjørn T.
Nov 28 at 20:58
In addition to what @TorbjørnT. is saying, you could use
remember picture
to remember the coordinates in a given picture. You can then access them withoverlay,remember picture
in a separate picture.– marmot
Nov 28 at 21:08