Skip to content

Commit 5beb654

Browse files
authored
Add reset color order section to figures.md
Added section on resetting color order in MATLAB figures.
1 parent f31a7cb commit 5beb654

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

programming-notes/matlab/figures.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,18 @@
33
Hierarchy of Figure objects.
44

55
<img width="399" height="290" alt="v2_gobjects_top-01" src="https://github.com/user-attachments/assets/ef906218-3256-4932-a98e-2091c0b706b3" />
6+
7+
8+
9+
## Reset color order
10+
11+
```matlab
12+
set(gca,'ColorOrderIndex',1) % reset color order for plot
13+
```
14+
15+
or
16+
17+
```matlab
18+
ax = gca;
19+
ax.ColorOrderIndex = 1; % reset color order for plot
20+
```

0 commit comments

Comments
 (0)