summaryrefslogtreecommitdiff
path: root/embellishing_a_plot/quickref.tex
blob: 78459f281327160b74294a5c94901f4911c57c69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Plot with a specific color. Ex: RED :\\
{\ex \lstinline|    plot(x, f(x), "r")|}

Plot with a specific style. Ex: DASHED :\\
{\ex \lstinline|    plot(x, f(x), "--")|}

Plot with specific color and style. Ex: RED DASHED :\\
{\ex \lstinline|    plot(x, f(x), "r--")|}

Plot with a specific line thickness:\\
{\ex \lstinline|    plot(x, f(x), linewidth=3)|}

Adding title:\\
{\ex \lstinline|    title("Plot of sin(x)")|}

labelling the axes:\\
{\ex \lstinline|    xlabel("x")|}
{\ex \lstinline|    ylabel("f(x)")|}

Adding annotations:\\
{\ex \lstinline|    annotate("localmax", xy=(1, 2))|}

Using LaTeX typesetting on any text:\\
{\ex \lstinline|    title("Plot of $sin(x)$")|}

Getting the axes limits:\\
{\ex \lstinline|    xlim()|}
{\ex \lstinline|    ylim()|}

Setting the axes limits:\\
{\ex \lstinline|    xlim(x_min, x_max)|}
{\ex \lstinline|    ylim(y_min, y_max)|}