Skip to content

Commit 0a1a1c8

Browse files
committed
cleaned examples
1 parent 90fe89f commit 0a1a1c8

File tree

9 files changed

+31
-90
lines changed

9 files changed

+31
-90
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

examples.py renamed to examples/show.py

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
1+
import sys
2+
import os
3+
from numpy.ma.core import size
4+
import pygame
15
import numpy as np
6+
7+
import matplotlib
8+
#matplotlib.use('pygame')
9+
matplotlib.use('pygame')
10+
211
import matplotlib.pyplot as plt
12+
import matplotlib.figure as fg
13+
14+
import matplotlib.image as mpimg
15+
316

417
def plot_error_bars_ex(ax):
518
# example data
@@ -104,4 +117,21 @@ def set_axis_style(ax, labels):
104117

105118
# set style for the axes
106119
labels = ['A', 'B', 'C', 'D']
107-
set_axis_style(ax, labels)
120+
set_axis_style(ax, labels)
121+
122+
fig, axes = plt.subplots(3,2,figsize=(16, 12))
123+
print(type(fig))
124+
125+
axes[0, 0].plot([1,2], [1,2], color='green', label='test')
126+
axes[0, 0].plot([1,2], [1,1], color='orange', lw=5, label='test other larger')
127+
# axes[0, 0].legend()
128+
axes[0, 1].text(0.5, 0.5, '2', size=50)
129+
axes[1, 0].set_xlabel('swag')
130+
axes[1, 0].fill_between([0, 1, 2], [1, 2, 3], [3, 4, 5])
131+
axes[1, 0].scatter([0, 1, 2], [2, 3, 4], s=50)
132+
axes[1, 1].imshow(mpimg.imread('images' + os.sep + 'long_dog.jpg'))
133+
plot_error_bars_ex(axes[2, 1])
134+
135+
plot_violin(axes[2, 0])
136+
137+
plt.show()
File renamed without changes.

test.py

Lines changed: 0 additions & 36 deletions
This file was deleted.

test_plt.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

test_show.py

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)