How to draw this graph in LaTeX [duplicate]
This question already has an answer here:
Materials for learning TikZ
8 answers
I would like help drawing a specific graph in LaTeX

tikz-pgf pgfplots graphs
marked as duplicate by Henri Menke
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Mar 1 at 7:10
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Materials for learning TikZ
8 answers
I would like help drawing a specific graph in LaTeX

tikz-pgf pgfplots graphs
marked as duplicate by Henri Menke
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Mar 1 at 7:10
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
3
Please indicate what you have tried, and where you got stuck. The pgfplots package is suitable for this sort of problem.
– Benjamin McKay
Feb 28 at 19:49
2
welcome to tex.se! what you try so far? how you like to help? which package for drawing you like to use?
– Zarko
Feb 28 at 19:49
add a comment |
This question already has an answer here:
Materials for learning TikZ
8 answers
I would like help drawing a specific graph in LaTeX

tikz-pgf pgfplots graphs
This question already has an answer here:
Materials for learning TikZ
8 answers
I would like help drawing a specific graph in LaTeX

This question already has an answer here:
Materials for learning TikZ
8 answers
tikz-pgf pgfplots graphs
tikz-pgf pgfplots graphs
edited Mar 1 at 6:56
JouleV
4,98111239
4,98111239
asked Feb 28 at 19:45
looshanlooshan
6
6
marked as duplicate by Henri Menke
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Mar 1 at 7:10
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Henri Menke
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Mar 1 at 7:10
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
3
Please indicate what you have tried, and where you got stuck. The pgfplots package is suitable for this sort of problem.
– Benjamin McKay
Feb 28 at 19:49
2
welcome to tex.se! what you try so far? how you like to help? which package for drawing you like to use?
– Zarko
Feb 28 at 19:49
add a comment |
3
Please indicate what you have tried, and where you got stuck. The pgfplots package is suitable for this sort of problem.
– Benjamin McKay
Feb 28 at 19:49
2
welcome to tex.se! what you try so far? how you like to help? which package for drawing you like to use?
– Zarko
Feb 28 at 19:49
3
3
Please indicate what you have tried, and where you got stuck. The pgfplots package is suitable for this sort of problem.
– Benjamin McKay
Feb 28 at 19:49
Please indicate what you have tried, and where you got stuck. The pgfplots package is suitable for this sort of problem.
– Benjamin McKay
Feb 28 at 19:49
2
2
welcome to tex.se! what you try so far? how you like to help? which package for drawing you like to use?
– Zarko
Feb 28 at 19:49
welcome to tex.se! what you try so far? how you like to help? which package for drawing you like to use?
– Zarko
Feb 28 at 19:49
add a comment |
1 Answer
1
active
oldest
votes
IMHO this is not a free hand graph.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}
begin{axis}[xlabel=$x$, ylabel=$y$,ymax=4,ymin=-4,unbounded coords=jump,
axis lines=middle,title style={at={(1,1)},anchor=north east},
title={$y=f(x)$},xtick={-2,0,2,4},ytick={-1},
]
addplot[blue,samples=101,domain=-7:3] {-1/(x*(x-3))};
addplot[blue,-latex] coordinates {(3,-1) (5,-1) (7,-3)};
draw[fill=white] (3,-1) circle (1.5pt);
draw[fill] (5,-1) circle (1.5pt);
draw (3,4) -- (3,-4);
end{axis}
end{tikzpicture}
end{document}

Or something with more pi's to prepare for the upcoming pi day. (This is just to say that there are infinitely many similarly looking functions.)
documentclass[tikz,border=3.14mm]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16,width=12cm,height=7cm}
begin{document}
begin{tikzpicture}
begin{axis}[xlabel=$x$, ylabel=$y$,ymax=4,ymin=-4,unbounded coords=jump,
axis lines=middle,title style={at={(1,1)},anchor=north east},
title={$y=f(x)$},xtick={-2,0,2,4},ytick={-1},
]
addplot[blue,samples=51,domain=-7:-0.02] {-1/pow(abs(x),pi/2)};
addplot[blue,samples=31,domain=0:3] {pow(abs(x-1.5),pi)};
addplot[blue,-latex] coordinates {(3,-1) (5,-1) (8,-3)};
draw[fill=white] (3,-1) circle (1.5pt);
draw[fill] (5,-1) circle (1.5pt);
draw (3,4) -- (3,-4);
end{axis}
end{tikzpicture}
end{document}

add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
IMHO this is not a free hand graph.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}
begin{axis}[xlabel=$x$, ylabel=$y$,ymax=4,ymin=-4,unbounded coords=jump,
axis lines=middle,title style={at={(1,1)},anchor=north east},
title={$y=f(x)$},xtick={-2,0,2,4},ytick={-1},
]
addplot[blue,samples=101,domain=-7:3] {-1/(x*(x-3))};
addplot[blue,-latex] coordinates {(3,-1) (5,-1) (7,-3)};
draw[fill=white] (3,-1) circle (1.5pt);
draw[fill] (5,-1) circle (1.5pt);
draw (3,4) -- (3,-4);
end{axis}
end{tikzpicture}
end{document}

Or something with more pi's to prepare for the upcoming pi day. (This is just to say that there are infinitely many similarly looking functions.)
documentclass[tikz,border=3.14mm]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16,width=12cm,height=7cm}
begin{document}
begin{tikzpicture}
begin{axis}[xlabel=$x$, ylabel=$y$,ymax=4,ymin=-4,unbounded coords=jump,
axis lines=middle,title style={at={(1,1)},anchor=north east},
title={$y=f(x)$},xtick={-2,0,2,4},ytick={-1},
]
addplot[blue,samples=51,domain=-7:-0.02] {-1/pow(abs(x),pi/2)};
addplot[blue,samples=31,domain=0:3] {pow(abs(x-1.5),pi)};
addplot[blue,-latex] coordinates {(3,-1) (5,-1) (8,-3)};
draw[fill=white] (3,-1) circle (1.5pt);
draw[fill] (5,-1) circle (1.5pt);
draw (3,4) -- (3,-4);
end{axis}
end{tikzpicture}
end{document}

add a comment |
IMHO this is not a free hand graph.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}
begin{axis}[xlabel=$x$, ylabel=$y$,ymax=4,ymin=-4,unbounded coords=jump,
axis lines=middle,title style={at={(1,1)},anchor=north east},
title={$y=f(x)$},xtick={-2,0,2,4},ytick={-1},
]
addplot[blue,samples=101,domain=-7:3] {-1/(x*(x-3))};
addplot[blue,-latex] coordinates {(3,-1) (5,-1) (7,-3)};
draw[fill=white] (3,-1) circle (1.5pt);
draw[fill] (5,-1) circle (1.5pt);
draw (3,4) -- (3,-4);
end{axis}
end{tikzpicture}
end{document}

Or something with more pi's to prepare for the upcoming pi day. (This is just to say that there are infinitely many similarly looking functions.)
documentclass[tikz,border=3.14mm]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16,width=12cm,height=7cm}
begin{document}
begin{tikzpicture}
begin{axis}[xlabel=$x$, ylabel=$y$,ymax=4,ymin=-4,unbounded coords=jump,
axis lines=middle,title style={at={(1,1)},anchor=north east},
title={$y=f(x)$},xtick={-2,0,2,4},ytick={-1},
]
addplot[blue,samples=51,domain=-7:-0.02] {-1/pow(abs(x),pi/2)};
addplot[blue,samples=31,domain=0:3] {pow(abs(x-1.5),pi)};
addplot[blue,-latex] coordinates {(3,-1) (5,-1) (8,-3)};
draw[fill=white] (3,-1) circle (1.5pt);
draw[fill] (5,-1) circle (1.5pt);
draw (3,4) -- (3,-4);
end{axis}
end{tikzpicture}
end{document}

add a comment |
IMHO this is not a free hand graph.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}
begin{axis}[xlabel=$x$, ylabel=$y$,ymax=4,ymin=-4,unbounded coords=jump,
axis lines=middle,title style={at={(1,1)},anchor=north east},
title={$y=f(x)$},xtick={-2,0,2,4},ytick={-1},
]
addplot[blue,samples=101,domain=-7:3] {-1/(x*(x-3))};
addplot[blue,-latex] coordinates {(3,-1) (5,-1) (7,-3)};
draw[fill=white] (3,-1) circle (1.5pt);
draw[fill] (5,-1) circle (1.5pt);
draw (3,4) -- (3,-4);
end{axis}
end{tikzpicture}
end{document}

Or something with more pi's to prepare for the upcoming pi day. (This is just to say that there are infinitely many similarly looking functions.)
documentclass[tikz,border=3.14mm]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16,width=12cm,height=7cm}
begin{document}
begin{tikzpicture}
begin{axis}[xlabel=$x$, ylabel=$y$,ymax=4,ymin=-4,unbounded coords=jump,
axis lines=middle,title style={at={(1,1)},anchor=north east},
title={$y=f(x)$},xtick={-2,0,2,4},ytick={-1},
]
addplot[blue,samples=51,domain=-7:-0.02] {-1/pow(abs(x),pi/2)};
addplot[blue,samples=31,domain=0:3] {pow(abs(x-1.5),pi)};
addplot[blue,-latex] coordinates {(3,-1) (5,-1) (8,-3)};
draw[fill=white] (3,-1) circle (1.5pt);
draw[fill] (5,-1) circle (1.5pt);
draw (3,4) -- (3,-4);
end{axis}
end{tikzpicture}
end{document}

IMHO this is not a free hand graph.
documentclass[tikz,border=3.14mm]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
begin{document}
begin{tikzpicture}
begin{axis}[xlabel=$x$, ylabel=$y$,ymax=4,ymin=-4,unbounded coords=jump,
axis lines=middle,title style={at={(1,1)},anchor=north east},
title={$y=f(x)$},xtick={-2,0,2,4},ytick={-1},
]
addplot[blue,samples=101,domain=-7:3] {-1/(x*(x-3))};
addplot[blue,-latex] coordinates {(3,-1) (5,-1) (7,-3)};
draw[fill=white] (3,-1) circle (1.5pt);
draw[fill] (5,-1) circle (1.5pt);
draw (3,4) -- (3,-4);
end{axis}
end{tikzpicture}
end{document}

Or something with more pi's to prepare for the upcoming pi day. (This is just to say that there are infinitely many similarly looking functions.)
documentclass[tikz,border=3.14mm]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16,width=12cm,height=7cm}
begin{document}
begin{tikzpicture}
begin{axis}[xlabel=$x$, ylabel=$y$,ymax=4,ymin=-4,unbounded coords=jump,
axis lines=middle,title style={at={(1,1)},anchor=north east},
title={$y=f(x)$},xtick={-2,0,2,4},ytick={-1},
]
addplot[blue,samples=51,domain=-7:-0.02] {-1/pow(abs(x),pi/2)};
addplot[blue,samples=31,domain=0:3] {pow(abs(x-1.5),pi)};
addplot[blue,-latex] coordinates {(3,-1) (5,-1) (8,-3)};
draw[fill=white] (3,-1) circle (1.5pt);
draw[fill] (5,-1) circle (1.5pt);
draw (3,4) -- (3,-4);
end{axis}
end{tikzpicture}
end{document}

edited Feb 28 at 21:08
answered Feb 28 at 20:19
marmotmarmot
106k5129243
106k5129243
add a comment |
add a comment |
3
Please indicate what you have tried, and where you got stuck. The pgfplots package is suitable for this sort of problem.
– Benjamin McKay
Feb 28 at 19:49
2
welcome to tex.se! what you try so far? how you like to help? which package for drawing you like to use?
– Zarko
Feb 28 at 19:49