How to plot a function for big range of values?plotting two time series with boundsGrouped bar chartHow do i...
can anyone help me with this awful query plan?
If a planet has 3 moons, is it possible to have triple Full/New Moons at once?
Why did C use the -> operator instead of reusing the . operator?
What happens to Mjolnir (Thor's hammer) at the end of Endgame?
Does tea made with boiling water cool faster than tea made with boiled (but still hot) water?
Is there a way to generate a list of distinct numbers such that no two subsets ever have an equal sum?
Map of water taps to fill bottles
Minor Revision with suggestion of an alternative proof by reviewer
"The cow" OR "a cow" OR "cows" in this context
Aliens crash on Earth and go into stasis to wait for technology to fix their ship
Two field separators (colon and space) in awk
Pre-plastic human skin alternative
Apply MapThread to all but one variable
Classification of surfaces
Is there any official lore on the Far Realm?
Do I have an "anti-research" personality?
Can we say “you can pay when the order gets ready”?
How to pronounce 'c++' in Spanish
Could the terminal length of components like resistors be reduced?
Why must Chinese maps be obfuscated?
How do I check if a string is entirely made of the same substring?
How did Captain America manage to do this?
"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?
What are the characteristics of a typeless programming language?
How to plot a function for big range of values?
plotting two time series with boundsGrouped bar chartHow do i get the x axis on top but keep a line on the bottomHow to prevent rounded and duplicated tick labels in pgfplots with fixed precision?How to hide empty (value 0) ybars with pgfplots?Show mark labels near marks and not centered in ybar interaval graphpgfplots: percentage in matrix plotCenter the axes in the coordinate originPlot a function between two valuespgfplots: modify axis after end axis / cut tikzpicture after drawing
I use Maple to plot the funtion f(x) = x*(x-6)*(x-12)*(x-20)
, where x = -.8 .. 21
.
I tried to draw it by pgfplots
, but I can not get the result.
documentclass[tikz]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usepackage{fouriernc}
usepackage{tikz}
pgfplotsset{every axis/.append style={
axis x line=middle,
axis y line=middle,
xlabel={$x$},
ylabel={$y$},
},
framed/.style={axis background/.style ={draw=black}},
}
% arrow style
tikzset{>=stealth}
begin{document}
begin{tikzpicture}[
declare function={
f(x)=x*(x-6)*(x-12)*(x-20);
}
]
begin{axis}[
framed, grid=both,
axis equal,
axis x line=middle, axis y line=middle,
axis line style = very thick,
ymin=-1.5, ymax=20,
yticklabels={},
width=22 cm,
height=2850cm, xticklabels={},
samples=500,
]
addplot[blue, very thick,domain=-1:21, smooth]{f(x)};
end{axis}
end{tikzpicture}
end{document}
How can I draw it?
pgfplots
add a comment |
I use Maple to plot the funtion f(x) = x*(x-6)*(x-12)*(x-20)
, where x = -.8 .. 21
.
I tried to draw it by pgfplots
, but I can not get the result.
documentclass[tikz]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usepackage{fouriernc}
usepackage{tikz}
pgfplotsset{every axis/.append style={
axis x line=middle,
axis y line=middle,
xlabel={$x$},
ylabel={$y$},
},
framed/.style={axis background/.style ={draw=black}},
}
% arrow style
tikzset{>=stealth}
begin{document}
begin{tikzpicture}[
declare function={
f(x)=x*(x-6)*(x-12)*(x-20);
}
]
begin{axis}[
framed, grid=both,
axis equal,
axis x line=middle, axis y line=middle,
axis line style = very thick,
ymin=-1.5, ymax=20,
yticklabels={},
width=22 cm,
height=2850cm, xticklabels={},
samples=500,
]
addplot[blue, very thick,domain=-1:21, smooth]{f(x)};
end{axis}
end{tikzpicture}
end{document}
How can I draw it?
pgfplots
The function is not the real problem. The main issue isheight=2850cm,
. How high should the plot really be?
– marmot
11 mins ago
@marmot Is there a way to draw? The height=2850cm, I tried a any number. You can change it.
– minhthien_2016
9 mins ago
add a comment |
I use Maple to plot the funtion f(x) = x*(x-6)*(x-12)*(x-20)
, where x = -.8 .. 21
.
I tried to draw it by pgfplots
, but I can not get the result.
documentclass[tikz]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usepackage{fouriernc}
usepackage{tikz}
pgfplotsset{every axis/.append style={
axis x line=middle,
axis y line=middle,
xlabel={$x$},
ylabel={$y$},
},
framed/.style={axis background/.style ={draw=black}},
}
% arrow style
tikzset{>=stealth}
begin{document}
begin{tikzpicture}[
declare function={
f(x)=x*(x-6)*(x-12)*(x-20);
}
]
begin{axis}[
framed, grid=both,
axis equal,
axis x line=middle, axis y line=middle,
axis line style = very thick,
ymin=-1.5, ymax=20,
yticklabels={},
width=22 cm,
height=2850cm, xticklabels={},
samples=500,
]
addplot[blue, very thick,domain=-1:21, smooth]{f(x)};
end{axis}
end{tikzpicture}
end{document}
How can I draw it?
pgfplots
I use Maple to plot the funtion f(x) = x*(x-6)*(x-12)*(x-20)
, where x = -.8 .. 21
.
I tried to draw it by pgfplots
, but I can not get the result.
documentclass[tikz]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usepackage{fouriernc}
usepackage{tikz}
pgfplotsset{every axis/.append style={
axis x line=middle,
axis y line=middle,
xlabel={$x$},
ylabel={$y$},
},
framed/.style={axis background/.style ={draw=black}},
}
% arrow style
tikzset{>=stealth}
begin{document}
begin{tikzpicture}[
declare function={
f(x)=x*(x-6)*(x-12)*(x-20);
}
]
begin{axis}[
framed, grid=both,
axis equal,
axis x line=middle, axis y line=middle,
axis line style = very thick,
ymin=-1.5, ymax=20,
yticklabels={},
width=22 cm,
height=2850cm, xticklabels={},
samples=500,
]
addplot[blue, very thick,domain=-1:21, smooth]{f(x)};
end{axis}
end{tikzpicture}
end{document}
How can I draw it?
pgfplots
pgfplots
asked 26 mins ago
minhthien_2016minhthien_2016
1,4911917
1,4911917
The function is not the real problem. The main issue isheight=2850cm,
. How high should the plot really be?
– marmot
11 mins ago
@marmot Is there a way to draw? The height=2850cm, I tried a any number. You can change it.
– minhthien_2016
9 mins ago
add a comment |
The function is not the real problem. The main issue isheight=2850cm,
. How high should the plot really be?
– marmot
11 mins ago
@marmot Is there a way to draw? The height=2850cm, I tried a any number. You can change it.
– minhthien_2016
9 mins ago
The function is not the real problem. The main issue is
height=2850cm,
. How high should the plot really be?– marmot
11 mins ago
The function is not the real problem. The main issue is
height=2850cm,
. How high should the plot really be?– marmot
11 mins ago
@marmot Is there a way to draw? The height=2850cm, I tried a any number. You can change it.
– minhthien_2016
9 mins ago
@marmot Is there a way to draw? The height=2850cm, I tried a any number. You can change it.
– minhthien_2016
9 mins ago
add a comment |
1 Answer
1
active
oldest
votes
You get a plot that looks IMHO very decent if you drop axis equal,ymin=-1.5, ymax=20,
and the enormous dimensions. axis equal
says that the units in x
and y
directions should coincide, but you know from your Maple plot that in the specified domain the plot varies by roughly 5000 in y
direction, so there is no way to reconcile this with a domain of only 21 units in x
direction. Of course, if you cut the plot by saying ymin=-1.5, ymax=20,
you will cut away pretty much everything. However, if you drop all this you get
documentclass[tikz]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usepackage{fouriernc}
pgfplotsset{every axis/.append style={
axis x line=middle,
axis y line=middle,
xlabel={$x$},
ylabel={$y$},
},
framed/.style={axis background/.style ={draw=black}},
}
% arrow style
tikzset{>=stealth}
begin{document}
begin{tikzpicture}[
declare function={f(x)=x*(x-6)*(x-12)*(x-20);%
}
]
begin{axis}[
framed, grid=both,
%axis equal,
axis x line=middle, axis y line=middle,
axis line style = very thick,
%ymin=-1.5, ymax=20,
yticklabels={},
width=12cm,
%height=0.4*28.50cm,
xticklabels={},
samples=50,
]
addplot[blue, very thick,domain=-1:21, smooth]{f(x)};
end{axis}
end{tikzpicture}
end{document}
which looks very much like the Maple plot.
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%2f487859%2fhow-to-plot-a-function-for-big-range-of-values%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
You get a plot that looks IMHO very decent if you drop axis equal,ymin=-1.5, ymax=20,
and the enormous dimensions. axis equal
says that the units in x
and y
directions should coincide, but you know from your Maple plot that in the specified domain the plot varies by roughly 5000 in y
direction, so there is no way to reconcile this with a domain of only 21 units in x
direction. Of course, if you cut the plot by saying ymin=-1.5, ymax=20,
you will cut away pretty much everything. However, if you drop all this you get
documentclass[tikz]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usepackage{fouriernc}
pgfplotsset{every axis/.append style={
axis x line=middle,
axis y line=middle,
xlabel={$x$},
ylabel={$y$},
},
framed/.style={axis background/.style ={draw=black}},
}
% arrow style
tikzset{>=stealth}
begin{document}
begin{tikzpicture}[
declare function={f(x)=x*(x-6)*(x-12)*(x-20);%
}
]
begin{axis}[
framed, grid=both,
%axis equal,
axis x line=middle, axis y line=middle,
axis line style = very thick,
%ymin=-1.5, ymax=20,
yticklabels={},
width=12cm,
%height=0.4*28.50cm,
xticklabels={},
samples=50,
]
addplot[blue, very thick,domain=-1:21, smooth]{f(x)};
end{axis}
end{tikzpicture}
end{document}
which looks very much like the Maple plot.
add a comment |
You get a plot that looks IMHO very decent if you drop axis equal,ymin=-1.5, ymax=20,
and the enormous dimensions. axis equal
says that the units in x
and y
directions should coincide, but you know from your Maple plot that in the specified domain the plot varies by roughly 5000 in y
direction, so there is no way to reconcile this with a domain of only 21 units in x
direction. Of course, if you cut the plot by saying ymin=-1.5, ymax=20,
you will cut away pretty much everything. However, if you drop all this you get
documentclass[tikz]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usepackage{fouriernc}
pgfplotsset{every axis/.append style={
axis x line=middle,
axis y line=middle,
xlabel={$x$},
ylabel={$y$},
},
framed/.style={axis background/.style ={draw=black}},
}
% arrow style
tikzset{>=stealth}
begin{document}
begin{tikzpicture}[
declare function={f(x)=x*(x-6)*(x-12)*(x-20);%
}
]
begin{axis}[
framed, grid=both,
%axis equal,
axis x line=middle, axis y line=middle,
axis line style = very thick,
%ymin=-1.5, ymax=20,
yticklabels={},
width=12cm,
%height=0.4*28.50cm,
xticklabels={},
samples=50,
]
addplot[blue, very thick,domain=-1:21, smooth]{f(x)};
end{axis}
end{tikzpicture}
end{document}
which looks very much like the Maple plot.
add a comment |
You get a plot that looks IMHO very decent if you drop axis equal,ymin=-1.5, ymax=20,
and the enormous dimensions. axis equal
says that the units in x
and y
directions should coincide, but you know from your Maple plot that in the specified domain the plot varies by roughly 5000 in y
direction, so there is no way to reconcile this with a domain of only 21 units in x
direction. Of course, if you cut the plot by saying ymin=-1.5, ymax=20,
you will cut away pretty much everything. However, if you drop all this you get
documentclass[tikz]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usepackage{fouriernc}
pgfplotsset{every axis/.append style={
axis x line=middle,
axis y line=middle,
xlabel={$x$},
ylabel={$y$},
},
framed/.style={axis background/.style ={draw=black}},
}
% arrow style
tikzset{>=stealth}
begin{document}
begin{tikzpicture}[
declare function={f(x)=x*(x-6)*(x-12)*(x-20);%
}
]
begin{axis}[
framed, grid=both,
%axis equal,
axis x line=middle, axis y line=middle,
axis line style = very thick,
%ymin=-1.5, ymax=20,
yticklabels={},
width=12cm,
%height=0.4*28.50cm,
xticklabels={},
samples=50,
]
addplot[blue, very thick,domain=-1:21, smooth]{f(x)};
end{axis}
end{tikzpicture}
end{document}
which looks very much like the Maple plot.
You get a plot that looks IMHO very decent if you drop axis equal,ymin=-1.5, ymax=20,
and the enormous dimensions. axis equal
says that the units in x
and y
directions should coincide, but you know from your Maple plot that in the specified domain the plot varies by roughly 5000 in y
direction, so there is no way to reconcile this with a domain of only 21 units in x
direction. Of course, if you cut the plot by saying ymin=-1.5, ymax=20,
you will cut away pretty much everything. However, if you drop all this you get
documentclass[tikz]{standalone}
usepackage{pgfplots}
pgfplotsset{compat=1.16}
usepackage{fouriernc}
pgfplotsset{every axis/.append style={
axis x line=middle,
axis y line=middle,
xlabel={$x$},
ylabel={$y$},
},
framed/.style={axis background/.style ={draw=black}},
}
% arrow style
tikzset{>=stealth}
begin{document}
begin{tikzpicture}[
declare function={f(x)=x*(x-6)*(x-12)*(x-20);%
}
]
begin{axis}[
framed, grid=both,
%axis equal,
axis x line=middle, axis y line=middle,
axis line style = very thick,
%ymin=-1.5, ymax=20,
yticklabels={},
width=12cm,
%height=0.4*28.50cm,
xticklabels={},
samples=50,
]
addplot[blue, very thick,domain=-1:21, smooth]{f(x)};
end{axis}
end{tikzpicture}
end{document}
which looks very much like the Maple plot.
answered 5 mins ago
marmotmarmot
121k6159297
121k6159297
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%2f487859%2fhow-to-plot-a-function-for-big-range-of-values%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
The function is not the real problem. The main issue is
height=2850cm,
. How high should the plot really be?– marmot
11 mins ago
@marmot Is there a way to draw? The height=2850cm, I tried a any number. You can change it.
– minhthien_2016
9 mins ago