Skip to content

Commit

Permalink
Update weather data example (#1417)
Browse files Browse the repository at this point in the history
* Update weather data example

* Update conda
  • Loading branch information
fmaussion committed May 21, 2017
1 parent d5c7e06 commit 5f92955
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion doc/environment.yml
Expand Up @@ -5,7 +5,7 @@ channels:
dependencies:
- python=3.5
- numpy=1.11.2
- pandas=0.19.1
- pandas=0.20.1
- numpydoc=0.6.0
- matplotlib=2.0.0
- seaborn=0.7.1
Expand Down
2 changes: 1 addition & 1 deletion doc/examples/_code/weather_data_setup.py
Expand Up @@ -6,7 +6,7 @@
np.random.seed(123)

times = pd.date_range('2000-01-01', '2001-12-31', name='time')
annual_cycle = np.sin(2 * np.pi * (times.dayofyear / 365.25 - 0.28))
annual_cycle = np.sin(2 * np.pi * (times.dayofyear.values / 365.25 - 0.28))

base = 10 + 15 * annual_cycle.reshape(-1, 1)
tmin_values = base + 3 * np.random.randn(annual_cycle.size, 3)
Expand Down
Binary file removed doc/examples/examples_pairplot.png
Binary file not shown.
8 changes: 1 addition & 7 deletions doc/examples/weather-data.rst
Expand Up @@ -42,15 +42,9 @@ Examine a dataset with pandas_ and seaborn_
@savefig examples_tmin_tmax_plot.png
ds.mean(dim='location').to_dataframe().plot()
.. ipython::
:verbatim:
In [6]: sns.pairplot(df.reset_index(), vars=ds.data_vars)
Out[6]: <seaborn.axisgrid.PairGrid at 0x7f0fd2368a10>

.. image:: examples_pairplot.png
.. ipython:: python
.. .. ipython:: python
@savefig examples_pairplot.png
sns.pairplot(df.reset_index(), vars=ds.data_vars)
Expand Down

0 comments on commit 5f92955

Please sign in to comment.