File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -15,14 +15,14 @@ pip install pygame-matplotlib
1515## Usage
1616
1717First you will need to specify that you want to use pygame backend.
18- ```
18+ ``` python
1919# Select pygame backend
2020import matplotlib
2121matplotlib.use(' module://pygame_matplotlib.backend_pygame' )
2222```
2323
2424Then you can use matplotlib as you usually do.
25- ```
25+ ``` python
2626# Standard matplotlib syntax
2727import matplotlib.pyplot as plt
2828fig, ax = plt.subplots() # Create a figure containing a single axes.
@@ -32,7 +32,7 @@ plt.show()
3232
3333Or you can include the plot in your game using the fact that a ``` Figure ``` is
3434also a ``` pygame.Surface ``` with this backend.
35- ```
35+ ``` python
3636import pygame
3737import pygame.display
3838
You can’t perform that action at this time.
0 commit comments