Error with code from geogebra
Hi everybody I'm trying to draw a graph from geogebra, but i don't know why, but there's an error. :(
Could you help me? thanks
documentclass[border=5mm]{standalone}
usepackage{pgf,tikz}
usetikzlibrary{arrows}
pagestyle{empty}
begin{document}
definecolor{ffqqqq}{rgb}{1.0,0.0,0.0}
definecolor{cqcqcq}{rgb}{0.7529411764705882,0.7529411764705882,0.7529411764705882}
begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
draw [color=cqcqcq,dash pattern=on 2pt off 2pt, xstep=1.0cm,ystep=1.0cm] (-5.0,-5.000000000000001) grid (13.60966,6.550825852439807);
draw[->,color=black] (-5.0,0.0) -- (13.60966,0.0);
foreach x in {-5.0,-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0}
draw[shift={(x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {footnotesize $x$};
draw[->,color=black] (0.0,-5.000000000000001) -- (0.0,6.550825852439807);
foreach y in {-5.0,-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0,5.0,6.0}
draw[shift={(0,y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {footnotesize $y$};
draw[color=black] (0pt,-10pt) node[right] {footnotesize $0$};
clip(-5.0,-5.000000000000001) rectangle (13.60966,6.550825852439807);
draw[line width=2.8000000000000003pt,smooth,samples=100,domain=-5.0:13.60966] plot(x,{1.0/2.0*(x)^(3.0)-2.0*(x)});
draw (-4.498348295652174,4.244636869852858) node[anchor=north west] {$f(x) , = ,frac{1}{2} ; x^{3} - 2 ; x$};
draw[line width=2.8000000000000003pt,color=ffqqqq,smooth,samples=100,domain=-5.0:13.60966] plot(x,{1.0/((x)^(2.0)+1.0)});
draw [color=ffqqqq](3.6251728521739124,3.349994592125162) node[anchor=north west] {$g(x) , = ,frac{1}{x^{2} + 1}$};
begin{scriptsize}
draw[color=black] (-2.5402884173913045,-4.741547786434222) node {$f$};
draw[color=ffqqqq] (-4.870541495652174,-0.08940794225020257) node {$g$};
end{scriptsize}
end{tikzpicture}
end{document}
tikz-pgf geogebra
add a comment |
Hi everybody I'm trying to draw a graph from geogebra, but i don't know why, but there's an error. :(
Could you help me? thanks
documentclass[border=5mm]{standalone}
usepackage{pgf,tikz}
usetikzlibrary{arrows}
pagestyle{empty}
begin{document}
definecolor{ffqqqq}{rgb}{1.0,0.0,0.0}
definecolor{cqcqcq}{rgb}{0.7529411764705882,0.7529411764705882,0.7529411764705882}
begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
draw [color=cqcqcq,dash pattern=on 2pt off 2pt, xstep=1.0cm,ystep=1.0cm] (-5.0,-5.000000000000001) grid (13.60966,6.550825852439807);
draw[->,color=black] (-5.0,0.0) -- (13.60966,0.0);
foreach x in {-5.0,-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0}
draw[shift={(x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {footnotesize $x$};
draw[->,color=black] (0.0,-5.000000000000001) -- (0.0,6.550825852439807);
foreach y in {-5.0,-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0,5.0,6.0}
draw[shift={(0,y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {footnotesize $y$};
draw[color=black] (0pt,-10pt) node[right] {footnotesize $0$};
clip(-5.0,-5.000000000000001) rectangle (13.60966,6.550825852439807);
draw[line width=2.8000000000000003pt,smooth,samples=100,domain=-5.0:13.60966] plot(x,{1.0/2.0*(x)^(3.0)-2.0*(x)});
draw (-4.498348295652174,4.244636869852858) node[anchor=north west] {$f(x) , = ,frac{1}{2} ; x^{3} - 2 ; x$};
draw[line width=2.8000000000000003pt,color=ffqqqq,smooth,samples=100,domain=-5.0:13.60966] plot(x,{1.0/((x)^(2.0)+1.0)});
draw [color=ffqqqq](3.6251728521739124,3.349994592125162) node[anchor=north west] {$g(x) , = ,frac{1}{x^{2} + 1}$};
begin{scriptsize}
draw[color=black] (-2.5402884173913045,-4.741547786434222) node {$f$};
draw[color=ffqqqq] (-4.870541495652174,-0.08940794225020257) node {$g$};
end{scriptsize}
end{tikzpicture}
end{document}
tikz-pgf geogebra
2
Which error do you get? Add the complete error message to your question (copy it from log file).
– Kurt
Dec 3 '18 at 1:40
add a comment |
Hi everybody I'm trying to draw a graph from geogebra, but i don't know why, but there's an error. :(
Could you help me? thanks
documentclass[border=5mm]{standalone}
usepackage{pgf,tikz}
usetikzlibrary{arrows}
pagestyle{empty}
begin{document}
definecolor{ffqqqq}{rgb}{1.0,0.0,0.0}
definecolor{cqcqcq}{rgb}{0.7529411764705882,0.7529411764705882,0.7529411764705882}
begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
draw [color=cqcqcq,dash pattern=on 2pt off 2pt, xstep=1.0cm,ystep=1.0cm] (-5.0,-5.000000000000001) grid (13.60966,6.550825852439807);
draw[->,color=black] (-5.0,0.0) -- (13.60966,0.0);
foreach x in {-5.0,-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0}
draw[shift={(x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {footnotesize $x$};
draw[->,color=black] (0.0,-5.000000000000001) -- (0.0,6.550825852439807);
foreach y in {-5.0,-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0,5.0,6.0}
draw[shift={(0,y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {footnotesize $y$};
draw[color=black] (0pt,-10pt) node[right] {footnotesize $0$};
clip(-5.0,-5.000000000000001) rectangle (13.60966,6.550825852439807);
draw[line width=2.8000000000000003pt,smooth,samples=100,domain=-5.0:13.60966] plot(x,{1.0/2.0*(x)^(3.0)-2.0*(x)});
draw (-4.498348295652174,4.244636869852858) node[anchor=north west] {$f(x) , = ,frac{1}{2} ; x^{3} - 2 ; x$};
draw[line width=2.8000000000000003pt,color=ffqqqq,smooth,samples=100,domain=-5.0:13.60966] plot(x,{1.0/((x)^(2.0)+1.0)});
draw [color=ffqqqq](3.6251728521739124,3.349994592125162) node[anchor=north west] {$g(x) , = ,frac{1}{x^{2} + 1}$};
begin{scriptsize}
draw[color=black] (-2.5402884173913045,-4.741547786434222) node {$f$};
draw[color=ffqqqq] (-4.870541495652174,-0.08940794225020257) node {$g$};
end{scriptsize}
end{tikzpicture}
end{document}
tikz-pgf geogebra
Hi everybody I'm trying to draw a graph from geogebra, but i don't know why, but there's an error. :(
Could you help me? thanks
documentclass[border=5mm]{standalone}
usepackage{pgf,tikz}
usetikzlibrary{arrows}
pagestyle{empty}
begin{document}
definecolor{ffqqqq}{rgb}{1.0,0.0,0.0}
definecolor{cqcqcq}{rgb}{0.7529411764705882,0.7529411764705882,0.7529411764705882}
begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
draw [color=cqcqcq,dash pattern=on 2pt off 2pt, xstep=1.0cm,ystep=1.0cm] (-5.0,-5.000000000000001) grid (13.60966,6.550825852439807);
draw[->,color=black] (-5.0,0.0) -- (13.60966,0.0);
foreach x in {-5.0,-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0}
draw[shift={(x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {footnotesize $x$};
draw[->,color=black] (0.0,-5.000000000000001) -- (0.0,6.550825852439807);
foreach y in {-5.0,-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0,5.0,6.0}
draw[shift={(0,y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {footnotesize $y$};
draw[color=black] (0pt,-10pt) node[right] {footnotesize $0$};
clip(-5.0,-5.000000000000001) rectangle (13.60966,6.550825852439807);
draw[line width=2.8000000000000003pt,smooth,samples=100,domain=-5.0:13.60966] plot(x,{1.0/2.0*(x)^(3.0)-2.0*(x)});
draw (-4.498348295652174,4.244636869852858) node[anchor=north west] {$f(x) , = ,frac{1}{2} ; x^{3} - 2 ; x$};
draw[line width=2.8000000000000003pt,color=ffqqqq,smooth,samples=100,domain=-5.0:13.60966] plot(x,{1.0/((x)^(2.0)+1.0)});
draw [color=ffqqqq](3.6251728521739124,3.349994592125162) node[anchor=north west] {$g(x) , = ,frac{1}{x^{2} + 1}$};
begin{scriptsize}
draw[color=black] (-2.5402884173913045,-4.741547786434222) node {$f$};
draw[color=ffqqqq] (-4.870541495652174,-0.08940794225020257) node {$g$};
end{scriptsize}
end{tikzpicture}
end{document}
tikz-pgf geogebra
tikz-pgf geogebra
edited Dec 3 '18 at 17:46
AndréC
7,63011440
7,63011440
asked Dec 3 '18 at 1:21
ryuk
1,017719
1,017719
2
Which error do you get? Add the complete error message to your question (copy it from log file).
– Kurt
Dec 3 '18 at 1:40
add a comment |
2
Which error do you get? Add the complete error message to your question (copy it from log file).
– Kurt
Dec 3 '18 at 1:40
2
2
Which error do you get? Add the complete error message to your question (copy it from log file).
– Kurt
Dec 3 '18 at 1:40
Which error do you get? Add the complete error message to your question (copy it from log file).
– Kurt
Dec 3 '18 at 1:40
add a comment |
1 Answer
1
active
oldest
votes
The culprit is
draw[line width=2.8000000000000003pt,smooth,samples=100,domain=-5.0:13.60966] plot(x,{1.0/2.0*(x)^(3.0)-2.0*(x)});
but the good news is that there is absolutely no need to use this large plot range.
documentclass[border=5mm]{standalone}
usepackage{pgf,tikz}
usetikzlibrary{arrows}
pagestyle{empty}
begin{document}
definecolor{ffqqqq}{rgb}{1.0,0.0,0.0}
definecolor{cqcqcq}{rgb}{0.7529411764705882,0.7529411764705882,0.7529411764705882}
begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
draw [color=cqcqcq,dash pattern=on 2pt off 2pt, xstep=1.0cm,ystep=1.0cm] (-5.0,-5.000000000000001) grid (13.60966,6.550825852439807);
draw[->,color=black] (-5.0,0.0) -- (13.60966,0.0);
foreach x in {-5.0,-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0}
{draw[shift={(x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below]
{footnotesize $x$};}
draw[->,color=black] (0.0,-5.000000000000001) -- (0.0,6.550825852439807);
foreach y in {-5.0,-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0,5.0,6.0}
{draw[shift={(0,y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left]
{footnotesize $y$};}
draw[color=black] (0pt,-10pt) node[right] {footnotesize $0$};
clip(-5.0,-5.000000000000001) rectangle (13.60966,6.550825852439807);
draw[line width=2.8000000000000003pt,smooth,samples=100,domain=-4:4]
plot(x,{1.0/2.0*(x)^3-2*(x)}); %13.60966
draw (-4.498348295652174,4.244636869852858) node[anchor=north west] {$f(x) , = ,frac{1}{2} ; x^{3} - 2 ; x$};
draw[line width=2.8000000000000003pt,color=ffqqqq,smooth,samples=100,domain=-5.0:13.60966] plot(x,{1.0/((x)^(2.0)+1.0)});
draw [color=ffqqqq](3.6251728521739124,3.349994592125162) node[anchor=north west] {$g(x) , = ,frac{1}{x^{2} + 1}$};
draw[color=black] (-2.5402884173913045,-4.741547786434222)
node[font=scriptsize] {$f$};
draw[color=ffqqqq] (-4.870541495652174,-0.08940794225020257) node[font=scriptsize] {$g$};
end{tikzpicture}
end{document}
I would also like to mention that you pursue a strategy which is IMHO somewhat peculiar. You employ some software, GeoGebra, which produces a code that you seem to not 100% understand. And then you seek help on an online forum. Don't get me wrong, there is by itself nothing really wrong with that. However, I personally would not like to be at the mercy of such software which, if I understand you correctly, produces an output that leads to errors. BTW, the code is really far from pretty or elegant. If I was you, I would consider abandoning GeoGebra and switch to pgfplots, where such plots can be produced with ease, and you will be safe from the dimension too large
error you got here.
@Ryuk Study the following examples from texample.net/tikz/examples/tag/gnuplot
– Samuel Diaz
Dec 3 '18 at 19:40
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%2f462892%2ferror-with-code-from-geogebra%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
The culprit is
draw[line width=2.8000000000000003pt,smooth,samples=100,domain=-5.0:13.60966] plot(x,{1.0/2.0*(x)^(3.0)-2.0*(x)});
but the good news is that there is absolutely no need to use this large plot range.
documentclass[border=5mm]{standalone}
usepackage{pgf,tikz}
usetikzlibrary{arrows}
pagestyle{empty}
begin{document}
definecolor{ffqqqq}{rgb}{1.0,0.0,0.0}
definecolor{cqcqcq}{rgb}{0.7529411764705882,0.7529411764705882,0.7529411764705882}
begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
draw [color=cqcqcq,dash pattern=on 2pt off 2pt, xstep=1.0cm,ystep=1.0cm] (-5.0,-5.000000000000001) grid (13.60966,6.550825852439807);
draw[->,color=black] (-5.0,0.0) -- (13.60966,0.0);
foreach x in {-5.0,-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0}
{draw[shift={(x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below]
{footnotesize $x$};}
draw[->,color=black] (0.0,-5.000000000000001) -- (0.0,6.550825852439807);
foreach y in {-5.0,-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0,5.0,6.0}
{draw[shift={(0,y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left]
{footnotesize $y$};}
draw[color=black] (0pt,-10pt) node[right] {footnotesize $0$};
clip(-5.0,-5.000000000000001) rectangle (13.60966,6.550825852439807);
draw[line width=2.8000000000000003pt,smooth,samples=100,domain=-4:4]
plot(x,{1.0/2.0*(x)^3-2*(x)}); %13.60966
draw (-4.498348295652174,4.244636869852858) node[anchor=north west] {$f(x) , = ,frac{1}{2} ; x^{3} - 2 ; x$};
draw[line width=2.8000000000000003pt,color=ffqqqq,smooth,samples=100,domain=-5.0:13.60966] plot(x,{1.0/((x)^(2.0)+1.0)});
draw [color=ffqqqq](3.6251728521739124,3.349994592125162) node[anchor=north west] {$g(x) , = ,frac{1}{x^{2} + 1}$};
draw[color=black] (-2.5402884173913045,-4.741547786434222)
node[font=scriptsize] {$f$};
draw[color=ffqqqq] (-4.870541495652174,-0.08940794225020257) node[font=scriptsize] {$g$};
end{tikzpicture}
end{document}
I would also like to mention that you pursue a strategy which is IMHO somewhat peculiar. You employ some software, GeoGebra, which produces a code that you seem to not 100% understand. And then you seek help on an online forum. Don't get me wrong, there is by itself nothing really wrong with that. However, I personally would not like to be at the mercy of such software which, if I understand you correctly, produces an output that leads to errors. BTW, the code is really far from pretty or elegant. If I was you, I would consider abandoning GeoGebra and switch to pgfplots, where such plots can be produced with ease, and you will be safe from the dimension too large
error you got here.
@Ryuk Study the following examples from texample.net/tikz/examples/tag/gnuplot
– Samuel Diaz
Dec 3 '18 at 19:40
add a comment |
The culprit is
draw[line width=2.8000000000000003pt,smooth,samples=100,domain=-5.0:13.60966] plot(x,{1.0/2.0*(x)^(3.0)-2.0*(x)});
but the good news is that there is absolutely no need to use this large plot range.
documentclass[border=5mm]{standalone}
usepackage{pgf,tikz}
usetikzlibrary{arrows}
pagestyle{empty}
begin{document}
definecolor{ffqqqq}{rgb}{1.0,0.0,0.0}
definecolor{cqcqcq}{rgb}{0.7529411764705882,0.7529411764705882,0.7529411764705882}
begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
draw [color=cqcqcq,dash pattern=on 2pt off 2pt, xstep=1.0cm,ystep=1.0cm] (-5.0,-5.000000000000001) grid (13.60966,6.550825852439807);
draw[->,color=black] (-5.0,0.0) -- (13.60966,0.0);
foreach x in {-5.0,-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0}
{draw[shift={(x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below]
{footnotesize $x$};}
draw[->,color=black] (0.0,-5.000000000000001) -- (0.0,6.550825852439807);
foreach y in {-5.0,-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0,5.0,6.0}
{draw[shift={(0,y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left]
{footnotesize $y$};}
draw[color=black] (0pt,-10pt) node[right] {footnotesize $0$};
clip(-5.0,-5.000000000000001) rectangle (13.60966,6.550825852439807);
draw[line width=2.8000000000000003pt,smooth,samples=100,domain=-4:4]
plot(x,{1.0/2.0*(x)^3-2*(x)}); %13.60966
draw (-4.498348295652174,4.244636869852858) node[anchor=north west] {$f(x) , = ,frac{1}{2} ; x^{3} - 2 ; x$};
draw[line width=2.8000000000000003pt,color=ffqqqq,smooth,samples=100,domain=-5.0:13.60966] plot(x,{1.0/((x)^(2.0)+1.0)});
draw [color=ffqqqq](3.6251728521739124,3.349994592125162) node[anchor=north west] {$g(x) , = ,frac{1}{x^{2} + 1}$};
draw[color=black] (-2.5402884173913045,-4.741547786434222)
node[font=scriptsize] {$f$};
draw[color=ffqqqq] (-4.870541495652174,-0.08940794225020257) node[font=scriptsize] {$g$};
end{tikzpicture}
end{document}
I would also like to mention that you pursue a strategy which is IMHO somewhat peculiar. You employ some software, GeoGebra, which produces a code that you seem to not 100% understand. And then you seek help on an online forum. Don't get me wrong, there is by itself nothing really wrong with that. However, I personally would not like to be at the mercy of such software which, if I understand you correctly, produces an output that leads to errors. BTW, the code is really far from pretty or elegant. If I was you, I would consider abandoning GeoGebra and switch to pgfplots, where such plots can be produced with ease, and you will be safe from the dimension too large
error you got here.
@Ryuk Study the following examples from texample.net/tikz/examples/tag/gnuplot
– Samuel Diaz
Dec 3 '18 at 19:40
add a comment |
The culprit is
draw[line width=2.8000000000000003pt,smooth,samples=100,domain=-5.0:13.60966] plot(x,{1.0/2.0*(x)^(3.0)-2.0*(x)});
but the good news is that there is absolutely no need to use this large plot range.
documentclass[border=5mm]{standalone}
usepackage{pgf,tikz}
usetikzlibrary{arrows}
pagestyle{empty}
begin{document}
definecolor{ffqqqq}{rgb}{1.0,0.0,0.0}
definecolor{cqcqcq}{rgb}{0.7529411764705882,0.7529411764705882,0.7529411764705882}
begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
draw [color=cqcqcq,dash pattern=on 2pt off 2pt, xstep=1.0cm,ystep=1.0cm] (-5.0,-5.000000000000001) grid (13.60966,6.550825852439807);
draw[->,color=black] (-5.0,0.0) -- (13.60966,0.0);
foreach x in {-5.0,-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0}
{draw[shift={(x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below]
{footnotesize $x$};}
draw[->,color=black] (0.0,-5.000000000000001) -- (0.0,6.550825852439807);
foreach y in {-5.0,-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0,5.0,6.0}
{draw[shift={(0,y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left]
{footnotesize $y$};}
draw[color=black] (0pt,-10pt) node[right] {footnotesize $0$};
clip(-5.0,-5.000000000000001) rectangle (13.60966,6.550825852439807);
draw[line width=2.8000000000000003pt,smooth,samples=100,domain=-4:4]
plot(x,{1.0/2.0*(x)^3-2*(x)}); %13.60966
draw (-4.498348295652174,4.244636869852858) node[anchor=north west] {$f(x) , = ,frac{1}{2} ; x^{3} - 2 ; x$};
draw[line width=2.8000000000000003pt,color=ffqqqq,smooth,samples=100,domain=-5.0:13.60966] plot(x,{1.0/((x)^(2.0)+1.0)});
draw [color=ffqqqq](3.6251728521739124,3.349994592125162) node[anchor=north west] {$g(x) , = ,frac{1}{x^{2} + 1}$};
draw[color=black] (-2.5402884173913045,-4.741547786434222)
node[font=scriptsize] {$f$};
draw[color=ffqqqq] (-4.870541495652174,-0.08940794225020257) node[font=scriptsize] {$g$};
end{tikzpicture}
end{document}
I would also like to mention that you pursue a strategy which is IMHO somewhat peculiar. You employ some software, GeoGebra, which produces a code that you seem to not 100% understand. And then you seek help on an online forum. Don't get me wrong, there is by itself nothing really wrong with that. However, I personally would not like to be at the mercy of such software which, if I understand you correctly, produces an output that leads to errors. BTW, the code is really far from pretty or elegant. If I was you, I would consider abandoning GeoGebra and switch to pgfplots, where such plots can be produced with ease, and you will be safe from the dimension too large
error you got here.
The culprit is
draw[line width=2.8000000000000003pt,smooth,samples=100,domain=-5.0:13.60966] plot(x,{1.0/2.0*(x)^(3.0)-2.0*(x)});
but the good news is that there is absolutely no need to use this large plot range.
documentclass[border=5mm]{standalone}
usepackage{pgf,tikz}
usetikzlibrary{arrows}
pagestyle{empty}
begin{document}
definecolor{ffqqqq}{rgb}{1.0,0.0,0.0}
definecolor{cqcqcq}{rgb}{0.7529411764705882,0.7529411764705882,0.7529411764705882}
begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
draw [color=cqcqcq,dash pattern=on 2pt off 2pt, xstep=1.0cm,ystep=1.0cm] (-5.0,-5.000000000000001) grid (13.60966,6.550825852439807);
draw[->,color=black] (-5.0,0.0) -- (13.60966,0.0);
foreach x in {-5.0,-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0}
{draw[shift={(x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below]
{footnotesize $x$};}
draw[->,color=black] (0.0,-5.000000000000001) -- (0.0,6.550825852439807);
foreach y in {-5.0,-4.0,-3.0,-2.0,-1.0,1.0,2.0,3.0,4.0,5.0,6.0}
{draw[shift={(0,y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left]
{footnotesize $y$};}
draw[color=black] (0pt,-10pt) node[right] {footnotesize $0$};
clip(-5.0,-5.000000000000001) rectangle (13.60966,6.550825852439807);
draw[line width=2.8000000000000003pt,smooth,samples=100,domain=-4:4]
plot(x,{1.0/2.0*(x)^3-2*(x)}); %13.60966
draw (-4.498348295652174,4.244636869852858) node[anchor=north west] {$f(x) , = ,frac{1}{2} ; x^{3} - 2 ; x$};
draw[line width=2.8000000000000003pt,color=ffqqqq,smooth,samples=100,domain=-5.0:13.60966] plot(x,{1.0/((x)^(2.0)+1.0)});
draw [color=ffqqqq](3.6251728521739124,3.349994592125162) node[anchor=north west] {$g(x) , = ,frac{1}{x^{2} + 1}$};
draw[color=black] (-2.5402884173913045,-4.741547786434222)
node[font=scriptsize] {$f$};
draw[color=ffqqqq] (-4.870541495652174,-0.08940794225020257) node[font=scriptsize] {$g$};
end{tikzpicture}
end{document}
I would also like to mention that you pursue a strategy which is IMHO somewhat peculiar. You employ some software, GeoGebra, which produces a code that you seem to not 100% understand. And then you seek help on an online forum. Don't get me wrong, there is by itself nothing really wrong with that. However, I personally would not like to be at the mercy of such software which, if I understand you correctly, produces an output that leads to errors. BTW, the code is really far from pretty or elegant. If I was you, I would consider abandoning GeoGebra and switch to pgfplots, where such plots can be produced with ease, and you will be safe from the dimension too large
error you got here.
edited Dec 3 '18 at 21:17
Torbjørn T.
155k13245435
155k13245435
answered Dec 3 '18 at 1:45
marmot
87.6k4100188
87.6k4100188
@Ryuk Study the following examples from texample.net/tikz/examples/tag/gnuplot
– Samuel Diaz
Dec 3 '18 at 19:40
add a comment |
@Ryuk Study the following examples from texample.net/tikz/examples/tag/gnuplot
– Samuel Diaz
Dec 3 '18 at 19:40
@Ryuk Study the following examples from texample.net/tikz/examples/tag/gnuplot
– Samuel Diaz
Dec 3 '18 at 19:40
@Ryuk Study the following examples from texample.net/tikz/examples/tag/gnuplot
– Samuel Diaz
Dec 3 '18 at 19:40
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%2f462892%2ferror-with-code-from-geogebra%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
2
Which error do you get? Add the complete error message to your question (copy it from log file).
– Kurt
Dec 3 '18 at 1:40