Open emmanuelle opened 8 years ago
Maybe bessel functions, as in the following Chaco plot: http://docs.enthought.com/chaco/user_manual/annotated_examples.html#bigdata-py
It would be nice to have figures for which the relation to the packages is more obvious. Following the suggestion of displaying Bessel functions, such a figure would nicely relate to the SciPy package, while a second image of a (random?) matrix using imshow
could be appropriate for NumPy.
Has this been implemented anywhere in the code? I'm looking for examples to create a consistent style, but I haven't been able to find any.
In the example given in how to contribute it doesn't look like there is a reference to plot_xxx.py
.
Thank you for the comment. The practice has been used to progressively replace the content but we have not documented it yet.
For the example you are working on, you can look at the file stats-interpolate.rst in the same directory, it uses the updated technique.
In short:
plot_XXX.py
with a top "docstring" (a short description between triple quotes)the figure will be named "auto_examples/images/sphx_glr_plot_XXX_001.png" (numbering from 001 onwards if several figures).
Proposal: add fives terms for a Fourier series. Quite simple and visual.
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0, 2, 201)
terms = [-np.sin(k*2*np.pi*x)*(-1)**k for k in [1, 2, 3, 4, 5]]
series = np.sum(terms, axis=0)
[plt.plot(x, terms[i], alpha=1/(i+1)) for i in range(len(terms))]
plt.plot(x, series)
plt.show()
Figure http://www.scipy-lectures.org/_images/random_c.jpg is not so nice and a static file (disclaimer: it's an old figure from my PhD work =p). It would be better to replace it with a cool figure generated from a Python script.