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}
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

add node at x={2}part. How can I modify it to have multiplexpoints? – Vent Nov 17 '15 at 17:30add node at={2,4,6,8}will do what you want (untested). – 1010011010 Nov 17 '15 at 18:21add node at x={...}statement (add node at x=2, add node at x=3, ...) – Jake Nov 17 '15 at 19:50