1

I need to draw a tangent to a graph at time = 4, 10, 16, and 24 on this graph. How would I go about drawing a tangent on it and measuring the gradient of the tangent?

\begin{tikzpicture}[rotate=90]
\begin{axis}
[
    width=20cm, height=14cm,
    title={Investigating the affect of concerntration on rate of reaction},
    xlabel={Time (s)},
    ylabel={Volume Displaced (cm$^3$)},
    grid style=dashed,
    ymajorgrids = true,
    xmajorgrids = true,
    mark size = 1,
]
\addplot[scatter , mark=halfcircle* , only marks , mark size=2.9pt , thick , smooth , color=orange ]
    table{data/2.9-conc1.dat}; 
\addplot[scatter , mark=square* , only marks , mark size=2.9pt , thick , smooth , color=red ]
    table{data/2.9-conc2.dat};
\legend{7:3,5:5}
\end{axis} \end{tikzpicture}

enter image description here

Here are the results:

X   Y
2   2.8
4   11.2
6   19.8
8   28.2
10  37.4
12  45.5
14  54.4
16  63.3
18  73.0
20  82.4
22  92.1
24  103.3
26  113.2

X   Y
2   10.8
4   26.0
6   43.0
8   60.0
10  79.4
12  98.5
14  119.0
16  139.2
18  163.1
20  187.0
22  211.8
24  238.5
26  267.7
Vent
  • 35
  • 1
    This might be of interest to you: http://tex.stackexchange.com/questions/197704/aligning-tangents-of-graphs – 1010011010 Nov 17 '15 at 16:16
  • Nice, Ive added it to my code. The only thing is the add node at x={2} part. How can I modify it to have multiple x points? – Vent Nov 17 '15 at 17:30
  • You're most likely looking for a comma separated list. I'm guessing add node at={2,4,6,8} will do what you want (untested). – 1010011010 Nov 17 '15 at 18:21
  • No, that didn't work. I've been trying a few things so far but havent found anything. – Vent Nov 17 '15 at 18:25
  • @Syne: You can repeat the add node at x={...} statement (add node at x=2, add node at x=3, ...) – Jake Nov 17 '15 at 19:50

0 Answers0