Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass[twoside]{book}
- usepackage{ tikz, pgfplots}
- linespread{1.25}
- usepackage{lipsum}
- pagestyle{empty}
- usepackage{cancel}
- begin{document}
- section{LaTeX Spacing Issues}
- lipsum[1]
- %begin{example}
- textbf{Main Example:}
- several texts and equations here. It seems that if there is not enough space for the graph, then LaTeX automatically adjust the space between lines/graphs.
- [y = x]
- Another equation,
- [y = x^2]
- [
- begin{tikzpicture}[x=1cm,y=0.07cm]
- defxmin{0}
- defxmax{10}
- defymin{0}
- defymax{120}
- % grid
- draw[style=help lines, ystep=10, xstep=1] (xmin,ymin) grid (xmax,ymax);
- % axes
- draw[->] (xmin,ymin) -- coordinate (x axis mid) (xmax+.5,ymin) node[below] {$x$};
- draw[->] (xmin,ymin) -- coordinate (y axis mid) (xmin,ymax+5) node[left] {$y$};
- % xticks and yticks
- foreach x in { 1, 2, ..., 10}
- node at (x, ymin) [below] {x};
- foreach y in {20, 40, ..., 120}
- node at (xmin,y) [left] {y};t
- draw[scale=1,domain=0:10,smooth,variable=x,blue, thick] plot ({x},{12*x});
- foreach Point in {(1,12), (2,24), (3,36), (4,48), (5,60), (6,72), (7, 84)}{
- node at Point {textbullet};
- node[below=.5cm] at (x axis mid) {Number of visitors};
- node[left=.8cm,rotate=90] at (y axis mid) {Money taken };
- }
- end{tikzpicture}
- ]
- %end{example}
- subsection*{New section}
- lipsum[1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement