Skip to content

Commit 78d951b

Browse files
committed
MNT: updates / feedback from ORNL presentation
1 parent 399fc47 commit 78d951b

File tree

7 files changed

+18
-6
lines changed

7 files changed

+18
-6
lines changed

02-event_filter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import matplotlib.pyplot as plt
22
from itertools import cycle
33

4+
45
class LineMaker:
56
def __init__(self, ln):
67
# stash the current data
@@ -56,5 +57,6 @@ def on_key(self, event):
5657
plt.show()
5758
# EXERCISE
5859
# - modify to remove the closest point when key == 'shift'
60+
5961
# - change the line width for [1-9]
6062
# - clear the line when event.key == 'escape'

key/00-explore.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# This may be required if you are on a Mac and default to using OSX as
2+
# your backend
3+
# import matplotlib
4+
# matplotlib.use('qt5agg')
5+
16
import matplotlib.pyplot as plt
27
import numpy as np
38

key/01-callable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ def collect_string(self):
4242

4343
fc = FormatterCollector()
4444
cids = {k: fig.canvas.mpl_connect(k, fc)
45-
for k in ('key_press_event')}
45+
for k in ('key_press_event', )}

notes.org

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ https://www.packtpub.com/application-development/interactive-applications-using-
2828

2929
** install
3030

31-
$ conda create mpl_tut -c anaconda matplotlib pandas pytables ipython h5py python=3.6
31+
$ conda create mpl_tut -c anaconda matplotlib pandas pytables ipython h5py scipy python=3.6
3232
$ source activate mpl_tut
3333

3434
* 00-explore

slides/slides.org

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,6 @@ new backend).
184184
* 00 Installation
185185
** installation
186186

187-
=conda create mpl_tut -c anaconda matplotlib pandas pytables h5py ipython python=3.6=
187+
conda create -n mpl_tut -c anaconda matplotlib pandas pytables h5py ipython scipy python=3.6
188+
source activate mpl_tut
189+
git clone https://github.com/tacaswell/interactive_mpl_tutorial

weather/03-picking.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ def remove(self):
5050

5151
# EXERCISE
5252
# - make the print out nicer looking
53-
# - make picking add a label with `label_data`
54-
# - use `get_gid` to filter instead of `is not`
53+
5554
# - open a new window with plot of day temperature
5655
# - fig, ax = plt.subplots()
5756
# - one_day = extract_day_of_hourly(bwi, 2015, 10, 18)
57+
58+
59+
# - make picking add a label with `label_data`
60+
# - use `get_gid` to filter instead of `is not`

weather/key/04-custom_plotting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import matplotlib.pyplot as plt
2-
from pddc_helpers import load_bwi_data, aggregate_by_month
2+
from w_helpers import load_bwi_data, aggregate_by_month
33
plt.ion()
44

55
bwi = load_bwi_data()

0 commit comments

Comments
 (0)