Differences between pgfplots and tkz-fct plots
I am trying to choose between pgfplots
and tkz-fct
for producing beautiful graphs in LaTeX. It seems tkz-fct
graphs look better with less effort (fewer lines of code) compared to pgfplots
. The documentation for tkz-fct isn't English however, so I am struggling with finding how to draw things like horizontal and vertical lines, points, holes, etc. which I know how to draw in pgfplots
. Because of the language barrier, I am leaning toward using pgfplots
for my plots. However, I want to know what else one should consider when deciding between the two systems.
As an experiment, I tried producing the same plot using both systems and compared the results:
documentclass{book}
usepackage[margin=.75 in]{geometry}
usepackage[english = american]{csquotes}
usepackage[utf8x]{inputenc}
usepackage{amsmath,amsfonts,amssymb,amsthm,color,srcltx,thmtools}
MakeOuterQuote{"}
usepackage{pgf,tikz}
usepackage{pgfplots}
usepgfplotslibrary{polar}
usepgflibrary{shapes.geometric}
usetikzlibrary{automata,arrows,positioning,calc,decorations.pathreplacing}
usepackage{physics}
usepackage{tkz-fct}
begin{document}
begin{center}
begin{tikzpicture}
begin{axis}[
grid, height=10cm,
axis x line=middle,
axis y line=middle,
xlabel={$x$}, ylabel={$y$},
xtick={-5,-4,...,5}, ytick={-40,-30,...,40},
xmin=-5, xmax=5, ymin=-40, ymax=40,
]
addplot[domain=-5:5, samples=100, mark=none, thick, blue]{-3*x^4+6*x^3+9*x^2-24*x+12};
end{axis}
end{tikzpicture}
end{center}
begin{center}
begin{tikzpicture}
tkzInit[xmin=-5,xmax=5,ymin=-40,ymax=40,ystep=10]
tkzGrid
tkzAxeXY
tkzFct[color=blue, thick, domain=-5:5]{-3*x**4+6*x**3+9*x**2-24*x+12};
end{tikzpicture}
end{center}
end{document}
The graphs look mostly the same, except better positions of the x
and y
labels from tkz-fct
.
It seems like this pgfplots
requires writing more manual specifications to get a good-looking picture (e.g. if you don't specify the number of samples, you'll get a jaggedly-drawn graph), while tkz-fct
is a bit more automatic.
Currently pgfplots
is throwing an error Package pgfplots Warning: running in backwards compatibility mode (unsuitable tick labels; missing features). Consider writing pgfplotsset{compat=1.15} into your preamble."
However the code still compiles, so this isn't a complete deal-breaker for me (I'm probably just doing something wrong.)
On the other hand, there's a breaking incompatibility with tkz-fct
and thmtools
, as this question discusses. This issue, combined with the lack of English documentation, make me lean toward using pgfplots
for my graphs.
Are there any downsides to using pgfplots
relative to tkz-fct
I should keep in mind, before counting out tkz-fct
? What should one consider when choosing between packages? What are the relative strengths of each, and relative disadvantages? Thanks for your thoughts.
tikz-pgf pgfplots errors tkz-fct
add a comment |
I am trying to choose between pgfplots
and tkz-fct
for producing beautiful graphs in LaTeX. It seems tkz-fct
graphs look better with less effort (fewer lines of code) compared to pgfplots
. The documentation for tkz-fct isn't English however, so I am struggling with finding how to draw things like horizontal and vertical lines, points, holes, etc. which I know how to draw in pgfplots
. Because of the language barrier, I am leaning toward using pgfplots
for my plots. However, I want to know what else one should consider when deciding between the two systems.
As an experiment, I tried producing the same plot using both systems and compared the results:
documentclass{book}
usepackage[margin=.75 in]{geometry}
usepackage[english = american]{csquotes}
usepackage[utf8x]{inputenc}
usepackage{amsmath,amsfonts,amssymb,amsthm,color,srcltx,thmtools}
MakeOuterQuote{"}
usepackage{pgf,tikz}
usepackage{pgfplots}
usepgfplotslibrary{polar}
usepgflibrary{shapes.geometric}
usetikzlibrary{automata,arrows,positioning,calc,decorations.pathreplacing}
usepackage{physics}
usepackage{tkz-fct}
begin{document}
begin{center}
begin{tikzpicture}
begin{axis}[
grid, height=10cm,
axis x line=middle,
axis y line=middle,
xlabel={$x$}, ylabel={$y$},
xtick={-5,-4,...,5}, ytick={-40,-30,...,40},
xmin=-5, xmax=5, ymin=-40, ymax=40,
]
addplot[domain=-5:5, samples=100, mark=none, thick, blue]{-3*x^4+6*x^3+9*x^2-24*x+12};
end{axis}
end{tikzpicture}
end{center}
begin{center}
begin{tikzpicture}
tkzInit[xmin=-5,xmax=5,ymin=-40,ymax=40,ystep=10]
tkzGrid
tkzAxeXY
tkzFct[color=blue, thick, domain=-5:5]{-3*x**4+6*x**3+9*x**2-24*x+12};
end{tikzpicture}
end{center}
end{document}
The graphs look mostly the same, except better positions of the x
and y
labels from tkz-fct
.
It seems like this pgfplots
requires writing more manual specifications to get a good-looking picture (e.g. if you don't specify the number of samples, you'll get a jaggedly-drawn graph), while tkz-fct
is a bit more automatic.
Currently pgfplots
is throwing an error Package pgfplots Warning: running in backwards compatibility mode (unsuitable tick labels; missing features). Consider writing pgfplotsset{compat=1.15} into your preamble."
However the code still compiles, so this isn't a complete deal-breaker for me (I'm probably just doing something wrong.)
On the other hand, there's a breaking incompatibility with tkz-fct
and thmtools
, as this question discusses. This issue, combined with the lack of English documentation, make me lean toward using pgfplots
for my graphs.
Are there any downsides to using pgfplots
relative to tkz-fct
I should keep in mind, before counting out tkz-fct
? What should one consider when choosing between packages? What are the relative strengths of each, and relative disadvantages? Thanks for your thoughts.
tikz-pgf pgfplots errors tkz-fct
add a comment |
I am trying to choose between pgfplots
and tkz-fct
for producing beautiful graphs in LaTeX. It seems tkz-fct
graphs look better with less effort (fewer lines of code) compared to pgfplots
. The documentation for tkz-fct isn't English however, so I am struggling with finding how to draw things like horizontal and vertical lines, points, holes, etc. which I know how to draw in pgfplots
. Because of the language barrier, I am leaning toward using pgfplots
for my plots. However, I want to know what else one should consider when deciding between the two systems.
As an experiment, I tried producing the same plot using both systems and compared the results:
documentclass{book}
usepackage[margin=.75 in]{geometry}
usepackage[english = american]{csquotes}
usepackage[utf8x]{inputenc}
usepackage{amsmath,amsfonts,amssymb,amsthm,color,srcltx,thmtools}
MakeOuterQuote{"}
usepackage{pgf,tikz}
usepackage{pgfplots}
usepgfplotslibrary{polar}
usepgflibrary{shapes.geometric}
usetikzlibrary{automata,arrows,positioning,calc,decorations.pathreplacing}
usepackage{physics}
usepackage{tkz-fct}
begin{document}
begin{center}
begin{tikzpicture}
begin{axis}[
grid, height=10cm,
axis x line=middle,
axis y line=middle,
xlabel={$x$}, ylabel={$y$},
xtick={-5,-4,...,5}, ytick={-40,-30,...,40},
xmin=-5, xmax=5, ymin=-40, ymax=40,
]
addplot[domain=-5:5, samples=100, mark=none, thick, blue]{-3*x^4+6*x^3+9*x^2-24*x+12};
end{axis}
end{tikzpicture}
end{center}
begin{center}
begin{tikzpicture}
tkzInit[xmin=-5,xmax=5,ymin=-40,ymax=40,ystep=10]
tkzGrid
tkzAxeXY
tkzFct[color=blue, thick, domain=-5:5]{-3*x**4+6*x**3+9*x**2-24*x+12};
end{tikzpicture}
end{center}
end{document}
The graphs look mostly the same, except better positions of the x
and y
labels from tkz-fct
.
It seems like this pgfplots
requires writing more manual specifications to get a good-looking picture (e.g. if you don't specify the number of samples, you'll get a jaggedly-drawn graph), while tkz-fct
is a bit more automatic.
Currently pgfplots
is throwing an error Package pgfplots Warning: running in backwards compatibility mode (unsuitable tick labels; missing features). Consider writing pgfplotsset{compat=1.15} into your preamble."
However the code still compiles, so this isn't a complete deal-breaker for me (I'm probably just doing something wrong.)
On the other hand, there's a breaking incompatibility with tkz-fct
and thmtools
, as this question discusses. This issue, combined with the lack of English documentation, make me lean toward using pgfplots
for my graphs.
Are there any downsides to using pgfplots
relative to tkz-fct
I should keep in mind, before counting out tkz-fct
? What should one consider when choosing between packages? What are the relative strengths of each, and relative disadvantages? Thanks for your thoughts.
tikz-pgf pgfplots errors tkz-fct
I am trying to choose between pgfplots
and tkz-fct
for producing beautiful graphs in LaTeX. It seems tkz-fct
graphs look better with less effort (fewer lines of code) compared to pgfplots
. The documentation for tkz-fct isn't English however, so I am struggling with finding how to draw things like horizontal and vertical lines, points, holes, etc. which I know how to draw in pgfplots
. Because of the language barrier, I am leaning toward using pgfplots
for my plots. However, I want to know what else one should consider when deciding between the two systems.
As an experiment, I tried producing the same plot using both systems and compared the results:
documentclass{book}
usepackage[margin=.75 in]{geometry}
usepackage[english = american]{csquotes}
usepackage[utf8x]{inputenc}
usepackage{amsmath,amsfonts,amssymb,amsthm,color,srcltx,thmtools}
MakeOuterQuote{"}
usepackage{pgf,tikz}
usepackage{pgfplots}
usepgfplotslibrary{polar}
usepgflibrary{shapes.geometric}
usetikzlibrary{automata,arrows,positioning,calc,decorations.pathreplacing}
usepackage{physics}
usepackage{tkz-fct}
begin{document}
begin{center}
begin{tikzpicture}
begin{axis}[
grid, height=10cm,
axis x line=middle,
axis y line=middle,
xlabel={$x$}, ylabel={$y$},
xtick={-5,-4,...,5}, ytick={-40,-30,...,40},
xmin=-5, xmax=5, ymin=-40, ymax=40,
]
addplot[domain=-5:5, samples=100, mark=none, thick, blue]{-3*x^4+6*x^3+9*x^2-24*x+12};
end{axis}
end{tikzpicture}
end{center}
begin{center}
begin{tikzpicture}
tkzInit[xmin=-5,xmax=5,ymin=-40,ymax=40,ystep=10]
tkzGrid
tkzAxeXY
tkzFct[color=blue, thick, domain=-5:5]{-3*x**4+6*x**3+9*x**2-24*x+12};
end{tikzpicture}
end{center}
end{document}
The graphs look mostly the same, except better positions of the x
and y
labels from tkz-fct
.
It seems like this pgfplots
requires writing more manual specifications to get a good-looking picture (e.g. if you don't specify the number of samples, you'll get a jaggedly-drawn graph), while tkz-fct
is a bit more automatic.
Currently pgfplots
is throwing an error Package pgfplots Warning: running in backwards compatibility mode (unsuitable tick labels; missing features). Consider writing pgfplotsset{compat=1.15} into your preamble."
However the code still compiles, so this isn't a complete deal-breaker for me (I'm probably just doing something wrong.)
On the other hand, there's a breaking incompatibility with tkz-fct
and thmtools
, as this question discusses. This issue, combined with the lack of English documentation, make me lean toward using pgfplots
for my graphs.
Are there any downsides to using pgfplots
relative to tkz-fct
I should keep in mind, before counting out tkz-fct
? What should one consider when choosing between packages? What are the relative strengths of each, and relative disadvantages? Thanks for your thoughts.
tikz-pgf pgfplots errors tkz-fct
tikz-pgf pgfplots errors tkz-fct
asked 2 mins ago
MathemanicMathemanic
54421321
54421321
add a comment |
add a comment |
0
active
oldest
votes
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%2f474800%2fdifferences-between-pgfplots-and-tkz-fct-plots%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f474800%2fdifferences-between-pgfplots-and-tkz-fct-plots%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