Skip to content

Commit 29b6f0c

Browse files
authored
Update figures.md
1 parent 745162f commit 29b6f0c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

programming-notes/matlab/figures.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,21 @@ plot(x, y, '-', DisplayName='blabla', HandleVisibility='off')
1818
- `HandleVisibility`: If `off` the series will not appear in the legend.
1919

2020

21+
## Select a different color theme
22+
23+
Before ploting:
24+
25+
```matlab
26+
set(groot,'defaultAxesColorOrder',turbo(7));
27+
```
28+
29+
A list of built-in themes [here](https://www.mathworks.com/help/matlab/ref/colormap.html#buc3wsn-6).
30+
2131

2232
## Reset color order
2333

34+
Reset color order so MATLAB goes back to the initial color. Good when trying to match colors (e.g., of points and lines) in same plot.
35+
2436
```matlab
2537
set(gca,'ColorOrderIndex',1) % reset color order for plot
2638
```

0 commit comments

Comments
 (0)