# Hot Gym Anomaly Plot Error

**URL:** https://discourse.numenta.org/t/hot-gym-anomaly-plot-error/1457
**Category:** NuPIC
**Created:** [September 30, 2016, 8:48pm UTC](https://discourse.numenta.org/t/hot-gym-anomaly-plot-error/1457 "2016-09-30T20:48:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![gbytze](https://avatars.discourse-cdn.com/v4/letter/g/4bbf92/32.png) [@gbytze](https://discourse.numenta.org/u/gbytze)
#### Post date: [September 30, 2016, 8:48pm UTC](https://discourse.numenta.org/t/hot-gym-anomaly-plot-error/1457/1 "2016-09-30T20:48:45Z")

</div>

Tried the ./run.py python script. The csv (non plot) generated fine, yet when plotting ran into this. Tried for a while to find issue, must be too close to see it?  
fursty@ubuntu:~/nupic/examples/opf/clients/hotgym/anomaly/one\_gym$ ./run.py --plot  
Creating model from rec-center-hourly…  
Importing model params from model\_params.rec\_center\_hourly\_model\_params  
Traceback (most recent call last):  
File “./run.py”, line 152, in   
runModel(GYM\_NAME, plot=plot)  
File “./run.py”, line 142, in runModel  
runIoThroughNupic(inputData, model, gymName, plot)  
File “./run.py”, line 102, in runIoThroughNupic  
output = nupic\_anomaly\_output.NuPICPlotOutput(gymName)  
File “/home/fursty/nupic/examples/opf/clients/hotgym/anomaly/one\_gym/nupic\_anomaly\_output.py”, line 167, in **init**  
plt.ion()  
NameError: global name ‘plt’ is not defined

Full dump is here

> <https://gist.github.com/fursty/8cff6ec29cfd6541355f4fa1548d2f27>

---

<div class="post-metadata">

### Author: ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)
#### Post date: [September 30, 2016, 8:50pm UTC](https://discourse.numenta.org/t/hot-gym-anomaly-plot-error/1457/2 "2016-09-30T20:50:42Z")

</div>

See:

> [@Problems using a Nupic example (Hotgym)](https://discourse.numenta.org/t/problems-using-a-nupic-example-hotgym/467/30):
>
> Do you know why the “–plot” is not working? acheron@ubuntu:~/nupic/examples/opf/clients/hotgym/prediction/one\_gym$ python run.py --"plot" Starts a NuPIC model from the model params returned by the swarm and pushes each line of input from the gym into the model. Results are written to an output file (default) or plotted dynamically if the --plot option is specified. NOTE: You must run ./swarm.py before this, because model parameters are required to run NuPIC. Creating model from rec-center-hour…
