TeX - LaTeX Asked by Mol on July 3, 2021
I have two graphs that I want to put side by side in Latex. At the moment they can only be displayed one underneath the other.
Both are in the format:
documentclass[11pt,a4paper]{article}
usepackage[sort]{natbib}
usepackage{fancyhdr}
usepackage{graphicx}
usepackage{amsmath,amsfonts,amsthm,nicefrac,latexsym,amsfonts,amsbsy,bm}
usepackage[nottoc,numbib]{tocbibind}
usepackage{lipsum}
usepackage{hyperref}
usepackage{tikz}
usepackage{pgfplots}
pgfplotsset{compat=newest}
usepackage{mwe}
begin{document}
begin{tikzpicture}[xscale=0.8,yscale=2,domain=0.5:7]
% Axes
draw[thick,->] (-.5,0) -- (10,0) node[right] {x};
draw[thick,->] (0,-0.1) -- (0,2.5) node[right] {f(x)};
% Curve
draw[color=white] (4.6,2.2) node[above,black]{Large {Backward Difference}};
draw[thick,color=black,domain=1.25:9,smooth,variable=x] plot ({10-x},{-ln(x)+2.5});
draw[very thick,color=red] (3,0.555)--(4.640957,0.825) node[above left,black]{Approximation};
draw[very thick,color=blue,domain=3.5:8.52,smooth,variable=x] plot (x,{0.81 + 0.2*(x-4.640957) ) }) node[below right,black] {Actual Derivative};
% Points
foreach point in {(3,0.555),(4.640957,0.825)}{% points fill point circle (1.5pt);}
% Axis labels
foreach x/xtext in {3/{x_{i-1}},4.640957/{x_i},7/{x_{i+1}}} draw(x cm,1pt) -- (x cm,-1pt) node[anchor=north,fill=white] {xtext};
end{tikzpicture}
end{document}
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP