This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
cs501r_f2016:lab1 [2016/08/29 16:32] admin |
cs501r_f2016:lab1 [2017/09/07 18:46] humphrey |
||
---|---|---|---|
Line 119: | Line 119: | ||
import matplotlib.pyplot as plt | import matplotlib.pyplot as plt | ||
- | plt.plot_date | ||
plt.legend | plt.legend | ||
Line 127: | Line 126: | ||
plt.tight_layout | plt.tight_layout | ||
+ | </code> | ||
+ | |||
+ | Also note that to get plots to show up inline, you may have to add the magic incantation **in the first cell**: | ||
+ | |||
+ | <code python> | ||
+ | |||
+ | %matplotlib inline | ||
+ | |||
+ | import matplotlib | ||
+ | import numpy as np | ||
+ | import matplotlib.pyplot as plt | ||
+ | |||
+ | </code> | ||
+ | |||
+ | Here is a full setup for cairo in linux, which should be sufficiently similar to mac: | ||
+ | <code> | ||
+ | 1. sudo apt-get install libcairo2-dev | ||
+ | 2. git clone https://github.com/pygobject/pycairo.git | ||
+ | 3. cd pycairo/ | ||
+ | 4. python setup.py build | ||
+ | 5. python setup.py install | ||
</code> | </code> | ||