-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Doc yinleon rebase #8860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doc yinleon rebase #8860
Changes from 1 commit
82c52f3
f9c9db1
e679205
860a331
e3429cd
c3a6534
20b6309
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
""" | ||
======== | ||
Resample | ||
======== | ||
=============== | ||
Resampling Data | ||
=============== | ||
|
||
|
||
Downsampling lowers the sample rate or sample size of a signal. In | ||
this tutorial, the signal is downsampled when the plot is adjusted | ||
through dragging and zooming. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ... except that the example is completely broken (try it). It should either be fixed or removed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It does what it claims, but in a weird way. It always down-samples to every 5th point but also clips the data. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. re worked this a bit. It works on zoom, but not pan which seems like a bug Mpl, not in the example. |
||
|
||
""" | ||
|
||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
|
||
|
||
# A class that will downsample the data and recompute when zoomed. | ||
class DataDisplayDownsampler(object): | ||
def __init__(self, xdata, ydata): | ||
self.origYData = ydata | ||
self.origXData = xdata | ||
self.ratio = 5 | ||
self.ratio = 50 | ||
self.delta = xdata[-1] - xdata[0] | ||
|
||
def downsample(self, xstart, xend): | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
''' | ||
==================== | ||
The Lorenz Attractor | ||
==================== | ||
================ | ||
Lorenz Attractor | ||
================ | ||
|
||
This is an example of plotting Edward Lorenz's 1963 "Deterministic | ||
Nonperiodic Flow" in a 3-dimensional space using mplot3d. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. link below could use proper rst markup too |
||
|
||
Plot of the Lorenz Attractor based on Edward Lorenz's 1963 "Deterministic | ||
Nonperiodic Flow" publication. | ||
http://journals.ametsoc.org/doi/abs/10.1175/1520-0469%281963%29020%3C0130%3ADNF%3E2.0.CO%3B2 | ||
|
||
Note: Because this is a simple non-linear ODE, it would be more easily | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
""" | ||
================== | ||
2D and 3D subplots | ||
================== | ||
|
||
Demonstrate the mixing of 2d and 3d subplots. | ||
============================================ | ||
Demonstrate the mixing of 2d and 3d subplots | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2D, 3D (see just below) |
||
============================================ | ||
This example shows a how to plot a 2D and 3D plot on the same figure. | ||
""" | ||
|
||
from mpl_toolkits.mplot3d import Axes3D | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
""" | ||
=========== | ||
Bar Stacked | ||
=========== | ||
================= | ||
Stacked Bar Graph | ||
================= | ||
|
||
This is an example of creating a stacked bar plot with error bars | ||
using `plt.bar`. Note the parameters `yerr` used for error bars, and | ||
`bottom` to stack the women's bars on top of the men's bars. | ||
|
||
A stacked bar plot with errorbars. | ||
""" | ||
|
||
# a stacked bar plot with errorbars | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment seems redundant now there's a proper description at the top. |
||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove blank line