Plotting point on a graph
I would like to draw the curve shown below including the marked points and the name of the curve.

Using the code
begin{center}
begin{tikzpicture}[scale=0.8,domain=-2:20]
begin{axis}[
height = 11.7cm,
width = 15cm,
axis lines=middle,
grid=major,
xmin=-2,
xmax=10,
ymin=-2,
ymax=20,
y label style={at={(axis description cs:0.5,-0.05)},anchor=north},
x label style={at={(axis description cs:-0.05,.5)},rotate=0,anchor=south},
xlabel=$y$,
ylabel=$x$,
xtick={-2,-1,0,...,14},
ytick={-2,0,...,20},
tick style={very thick},
legend style={
at={(rel axis cs:0,1)},
anchor=north west,draw=none,inner sep=0pt,fill=gray!10}
]
addplot[black,thick,samples=1] {0};
draw[color=red, smooth] plot (x,x*x-8*x+16) node[above left] {$y =x^2-8x+16$};
end{axis}
end{tikzpicture}
end{center}
We can create the graph but unable to mark the points.

tikz-pgf pgfplots graphs tikz-3dplot
add a comment |
I would like to draw the curve shown below including the marked points and the name of the curve.

Using the code
begin{center}
begin{tikzpicture}[scale=0.8,domain=-2:20]
begin{axis}[
height = 11.7cm,
width = 15cm,
axis lines=middle,
grid=major,
xmin=-2,
xmax=10,
ymin=-2,
ymax=20,
y label style={at={(axis description cs:0.5,-0.05)},anchor=north},
x label style={at={(axis description cs:-0.05,.5)},rotate=0,anchor=south},
xlabel=$y$,
ylabel=$x$,
xtick={-2,-1,0,...,14},
ytick={-2,0,...,20},
tick style={very thick},
legend style={
at={(rel axis cs:0,1)},
anchor=north west,draw=none,inner sep=0pt,fill=gray!10}
]
addplot[black,thick,samples=1] {0};
draw[color=red, smooth] plot (x,x*x-8*x+16) node[above left] {$y =x^2-8x+16$};
end{axis}
end{tikzpicture}
end{center}
We can create the graph but unable to mark the points.

tikz-pgf pgfplots graphs tikz-3dplot
add a comment |
I would like to draw the curve shown below including the marked points and the name of the curve.

Using the code
begin{center}
begin{tikzpicture}[scale=0.8,domain=-2:20]
begin{axis}[
height = 11.7cm,
width = 15cm,
axis lines=middle,
grid=major,
xmin=-2,
xmax=10,
ymin=-2,
ymax=20,
y label style={at={(axis description cs:0.5,-0.05)},anchor=north},
x label style={at={(axis description cs:-0.05,.5)},rotate=0,anchor=south},
xlabel=$y$,
ylabel=$x$,
xtick={-2,-1,0,...,14},
ytick={-2,0,...,20},
tick style={very thick},
legend style={
at={(rel axis cs:0,1)},
anchor=north west,draw=none,inner sep=0pt,fill=gray!10}
]
addplot[black,thick,samples=1] {0};
draw[color=red, smooth] plot (x,x*x-8*x+16) node[above left] {$y =x^2-8x+16$};
end{axis}
end{tikzpicture}
end{center}
We can create the graph but unable to mark the points.

tikz-pgf pgfplots graphs tikz-3dplot
I would like to draw the curve shown below including the marked points and the name of the curve.

Using the code
begin{center}
begin{tikzpicture}[scale=0.8,domain=-2:20]
begin{axis}[
height = 11.7cm,
width = 15cm,
axis lines=middle,
grid=major,
xmin=-2,
xmax=10,
ymin=-2,
ymax=20,
y label style={at={(axis description cs:0.5,-0.05)},anchor=north},
x label style={at={(axis description cs:-0.05,.5)},rotate=0,anchor=south},
xlabel=$y$,
ylabel=$x$,
xtick={-2,-1,0,...,14},
ytick={-2,0,...,20},
tick style={very thick},
legend style={
at={(rel axis cs:0,1)},
anchor=north west,draw=none,inner sep=0pt,fill=gray!10}
]
addplot[black,thick,samples=1] {0};
draw[color=red, smooth] plot (x,x*x-8*x+16) node[above left] {$y =x^2-8x+16$};
end{axis}
end{tikzpicture}
end{center}
We can create the graph but unable to mark the points.

tikz-pgf pgfplots graphs tikz-3dplot
tikz-pgf pgfplots graphs tikz-3dplot
edited Mar 27 at 23:32
Jettie Baker
asked Mar 27 at 18:25
Jettie BakerJettie Baker
646
646
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
This is based on your own answer with some modifications:
- Use
addplotinstead of the TikZydraw plot. - Put
scaleto the options of the axis (since that may be relevant once you start filling some areas). - Added coordinates with labels.
Result:
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{shadows.blur}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}[fancy label/.style={fill=white,rounded corners=1pt,blur
shadow}]
begin{axis}[scale=0.8,
height = 11.7cm,
width = 15cm,
axis lines=middle,
grid=major,
xmin=-2,
xmax=10,
ymin=-2,
ymax=20,
y label style={at={(axis description cs:0.5,-0.05)},anchor=north},
x label style={at={(axis description cs:-0.05,.5)},rotate=0,anchor=south},
xlabel=$y$,
ylabel=$x$,
xtick={-2,-1,0,...,14},
ytick={-2,0,...,20},
tick style={very thick},
legend style={
at={(rel axis cs:0,1)},
anchor=north west,draw=none,inner sep=0pt,fill=gray!10}
]
addplot[domain=-2:20,red,thick,smooth] {x*x-8*x+16} node[above left] {$y =x^2-8x+16$};
node[fill,circle,inner sep=1.5pt,label={[fancy label]right:$(0,16)$}] at
(0,16){};
node[fill,circle,inner sep=1.5pt,label={[fancy label]below left:$(4,0)$}] at
(4,0){};
end{axis}
end{tikzpicture}
end{document}

add a comment |
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
});
}
});
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%2f481764%2fplotting-point-on-a-graph%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
This is based on your own answer with some modifications:
- Use
addplotinstead of the TikZydraw plot. - Put
scaleto the options of the axis (since that may be relevant once you start filling some areas). - Added coordinates with labels.
Result:
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{shadows.blur}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}[fancy label/.style={fill=white,rounded corners=1pt,blur
shadow}]
begin{axis}[scale=0.8,
height = 11.7cm,
width = 15cm,
axis lines=middle,
grid=major,
xmin=-2,
xmax=10,
ymin=-2,
ymax=20,
y label style={at={(axis description cs:0.5,-0.05)},anchor=north},
x label style={at={(axis description cs:-0.05,.5)},rotate=0,anchor=south},
xlabel=$y$,
ylabel=$x$,
xtick={-2,-1,0,...,14},
ytick={-2,0,...,20},
tick style={very thick},
legend style={
at={(rel axis cs:0,1)},
anchor=north west,draw=none,inner sep=0pt,fill=gray!10}
]
addplot[domain=-2:20,red,thick,smooth] {x*x-8*x+16} node[above left] {$y =x^2-8x+16$};
node[fill,circle,inner sep=1.5pt,label={[fancy label]right:$(0,16)$}] at
(0,16){};
node[fill,circle,inner sep=1.5pt,label={[fancy label]below left:$(4,0)$}] at
(4,0){};
end{axis}
end{tikzpicture}
end{document}

add a comment |
This is based on your own answer with some modifications:
- Use
addplotinstead of the TikZydraw plot. - Put
scaleto the options of the axis (since that may be relevant once you start filling some areas). - Added coordinates with labels.
Result:
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{shadows.blur}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}[fancy label/.style={fill=white,rounded corners=1pt,blur
shadow}]
begin{axis}[scale=0.8,
height = 11.7cm,
width = 15cm,
axis lines=middle,
grid=major,
xmin=-2,
xmax=10,
ymin=-2,
ymax=20,
y label style={at={(axis description cs:0.5,-0.05)},anchor=north},
x label style={at={(axis description cs:-0.05,.5)},rotate=0,anchor=south},
xlabel=$y$,
ylabel=$x$,
xtick={-2,-1,0,...,14},
ytick={-2,0,...,20},
tick style={very thick},
legend style={
at={(rel axis cs:0,1)},
anchor=north west,draw=none,inner sep=0pt,fill=gray!10}
]
addplot[domain=-2:20,red,thick,smooth] {x*x-8*x+16} node[above left] {$y =x^2-8x+16$};
node[fill,circle,inner sep=1.5pt,label={[fancy label]right:$(0,16)$}] at
(0,16){};
node[fill,circle,inner sep=1.5pt,label={[fancy label]below left:$(4,0)$}] at
(4,0){};
end{axis}
end{tikzpicture}
end{document}

add a comment |
This is based on your own answer with some modifications:
- Use
addplotinstead of the TikZydraw plot. - Put
scaleto the options of the axis (since that may be relevant once you start filling some areas). - Added coordinates with labels.
Result:
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{shadows.blur}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}[fancy label/.style={fill=white,rounded corners=1pt,blur
shadow}]
begin{axis}[scale=0.8,
height = 11.7cm,
width = 15cm,
axis lines=middle,
grid=major,
xmin=-2,
xmax=10,
ymin=-2,
ymax=20,
y label style={at={(axis description cs:0.5,-0.05)},anchor=north},
x label style={at={(axis description cs:-0.05,.5)},rotate=0,anchor=south},
xlabel=$y$,
ylabel=$x$,
xtick={-2,-1,0,...,14},
ytick={-2,0,...,20},
tick style={very thick},
legend style={
at={(rel axis cs:0,1)},
anchor=north west,draw=none,inner sep=0pt,fill=gray!10}
]
addplot[domain=-2:20,red,thick,smooth] {x*x-8*x+16} node[above left] {$y =x^2-8x+16$};
node[fill,circle,inner sep=1.5pt,label={[fancy label]right:$(0,16)$}] at
(0,16){};
node[fill,circle,inner sep=1.5pt,label={[fancy label]below left:$(4,0)$}] at
(4,0){};
end{axis}
end{tikzpicture}
end{document}

This is based on your own answer with some modifications:
- Use
addplotinstead of the TikZydraw plot. - Put
scaleto the options of the axis (since that may be relevant once you start filling some areas). - Added coordinates with labels.
Result:
documentclass[tikz,border=3.14mm]{standalone}
usetikzlibrary{shadows.blur}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}[fancy label/.style={fill=white,rounded corners=1pt,blur
shadow}]
begin{axis}[scale=0.8,
height = 11.7cm,
width = 15cm,
axis lines=middle,
grid=major,
xmin=-2,
xmax=10,
ymin=-2,
ymax=20,
y label style={at={(axis description cs:0.5,-0.05)},anchor=north},
x label style={at={(axis description cs:-0.05,.5)},rotate=0,anchor=south},
xlabel=$y$,
ylabel=$x$,
xtick={-2,-1,0,...,14},
ytick={-2,0,...,20},
tick style={very thick},
legend style={
at={(rel axis cs:0,1)},
anchor=north west,draw=none,inner sep=0pt,fill=gray!10}
]
addplot[domain=-2:20,red,thick,smooth] {x*x-8*x+16} node[above left] {$y =x^2-8x+16$};
node[fill,circle,inner sep=1.5pt,label={[fancy label]right:$(0,16)$}] at
(0,16){};
node[fill,circle,inner sep=1.5pt,label={[fancy label]below left:$(4,0)$}] at
(4,0){};
end{axis}
end{tikzpicture}
end{document}

answered Mar 27 at 20:34
marmotmarmot
115k5146277
115k5146277
add a comment |
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.
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%2f481764%2fplotting-point-on-a-graph%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