This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
gibson:teaching:spring-2016:math445:lecture:scripts [2016/02/01 09:36] gibson |
gibson:teaching:spring-2016:math445:lecture:scripts [2016/02/03 13:54] (current) gibson [Logarithmic plots] |
||
---|---|---|---|
Line 4: | Line 4: | ||
<code> | <code> | ||
Matlab scripting | Matlab scripting | ||
- | plot, semilogy, semilogx, loglog | + | linestyles and plot modifiers: |
- | xlabel, ylabel, title, legend, axis, grid, clf, | + | xlabel, ylabel, title, legend, axis, grid, clf, |
- | linestyles | + | |
load, save | load, save | ||
- | what, pwd | + | plot, semilogy, semilogx, loglog |
+ | what, who, pwd, ls | ||
</code> | </code> | ||
Line 51: | Line 51: | ||
{{ :gibson:teaching:spring-2016:math445:sincos.png?direct&400 |}} | {{ :gibson:teaching:spring-2016:math445:sincos.png?direct&400 |}} | ||
- | ===== Markers and line styles ===== | + | ===== Line styles and markers ===== |
The above plotting script used the matlab **linestyle** codes '' 'b-' '' and '' 'r-' '' to generate blue and red curves for $\cos x$ and $\sin x$. Matlab's **help** function provides a pretty good description of how line and marker style codes work. | The above plotting script used the matlab **linestyle** codes '' 'b-' '' and '' 'r-' '' to generate blue and red curves for $\cos x$ and $\sin x$. Matlab's **help** function provides a pretty good description of how line and marker style codes work. | ||
Line 105: | Line 105: | ||
figure(2) % open new figure window, numbered 2 | figure(2) % open new figure window, numbered 2 | ||
</code> | </code> | ||
+ | |||
+ |