timhoffm on v3.2.x
Backport PR #15326: List of min… Merge pull request #15327 from … (compare)
dstansby on master
List of minimal versions of dep… Merge pull request #15326 from … (compare)
Does anyone have the interest and/or the time to help me out with an implementation of an interactive figure using WebAgg backend and Django? I'm still pretty stuck. My understanding is that implementing an interactive figure is straightforward. This documentation lead me to believe that all that needs to be done to implement an interactive figure is link the messages the websocket is sent to event handlers in a figure. I did that for my Django figure, but it seems to only render the changed objects in the figure rather than all objects in the figure. Here is my SO post:
we do that with
twinespecifically be used for publishing (probably the case already I imagine, tho)
norm=LogNorm()I get the following plot
norm=LogNorm()plot seems fine without holes
pytest-mplvisual tests in the tests that are automatically run on CI, I assume. I suppose that for many PRs and merges, the visualization outputs that are tested don't change. However, how does
matplotlibhandle things when a PR changes a test visualization? Do you have to flip a switch somewhere to tell CI to update its base image references?
pytest-mpltests for one of my projects, and I'm not sure when/how I should be running them.
Hi all! The documentation for the
contourf does not say that X and Y should be sorted, although this may be obvious to everyone. But on the other hand, the
contour works fine, that is, it correctly determines the levels. For example:
import numpy as np import matplotlib.pyplot as plt X = np.linspace(0, 10, 11) Y = np.linspace(0, 10, 11) np.random.shuffle(Y) Z = X + Y A = np.vstack([X, 3*Y]).T coef, _, _, _ = np.linalg.lstsq(A, Z, rcond=None) a1, a2 = coef X_1, Y_1 = np.meshgrid(X, Y) Z_1 = a1*X_1 + a2*Y_1 X_2, Y_2 = np.meshgrid(np.sort(X), np.sort(Y)) Z_2 = a1*X_2 + a2*Y_2 fig, (ax1, ax2, ax3, ax4) = plt.subplots(1, 4, figsize=(17,4)) cntr1 = ax1.contour(X_1, Y_1, Z_1, levels=20) cntr2 = ax2.contourf(X_1, Y_1, Z_1, levels=20) cntr3 = ax3.contour(X_2, Y_2, Z_2, levels=20) cntr4 = ax4.contourf(X_2, Y_2, Z_2, levels=20) plt.show()
If this is expected, I think it would be nice to add a note for the
contourf that X and Y should be sorted.