# TikZ Graph point by point instead of a curve's equation

Tchae shared this question 3 years ago

Hi, for about a year now, I'm encountering this recurring bug, not with every function by mostly with exponential, when exporting a graph to LateX code via TikZ, instead of creating a code with a draw line with the equation of the curve I get about a a thousand lines, drawing the curve from point to point.

It's very annoying and I don't know what to do.

On the attached file you'll see the begining of the code for the curve with equation y = 2 - exp(-2x) 1 1

Here is the .ggb file with, again, the TikZ latex code generated.

What I would like to get instead of these hundreds of lines is, like for most other functions, a line like :

`\draw[line width=1.5pt,color=qqwuqq,smooth,samples=100,domain=-2:8.8] plot(\x,{2.0 - exp(-2.0 * \x)});`

Best regards. 1

As a workaround have you tried putting some points on the graph and fitting a polynomial? 1

No I did not, because it's really not what I want to do, I already have a workaround solution consisting in typing down the draw[line...] myself in my LateX code.

The solution I'm looking for is a clean exportation from Geogebra,

I've been using GeoGebra with TikZ exports for about ten years now and I never had this kind of problems before, until it started one or two years ago, mostly with exponentials, I think.

I just modified my file and added a logarithm function and at the end of the exponential lines I get the usual draw for the logarithm.

Why is this not working anymore with the exponential ?

```\draw[line width=2.pt,color=qqwuqq] (6.950099999999956,1.99999908120242) -- (6.975049999999956,1.9999991259253036);
\draw[line width=2.pt,color=qqwuqq] (6.975049999999956,1.9999991259253036) -- (7,2);

\draw[line width=2.pt,color=ccqqqq,smooth,samples=100,domain=0.01:7] plot(\x,{ln((\x))});
``` 1

Sorry, we won't be able to look into that. The code is here if you can find someone who knows Java: https://github.com/geogebra... 1

Thank you but that's PSTricks, not TikZ if I'm not mistaken.

Is there another place where I can put my question ?

Best regards. 