Skip to content
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

unpin mpl #3468

Merged
merged 4 commits into from
Oct 17, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ script:
- >
if [[ ${TEST_TARGET} == 'default' ]]; then
export IRIS_REPO_DIR=${INSTALL_DIR};
python -m iris.tests.runner --default-tests --system-tests --print-failed-images;
Copy link
Member Author

@bjlittle bjlittle Oct 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retire this testing infrastructure - it's flaky and pre-dates the existing workflow using perceptual image hashing.

If there are graphical failures on travis-ci then the developer will rerun locally, which is an acceptable workflow now that we have the necessary idiff capability and repeatable travis-ci environments locally. So this --print-failed-images capability is really no longer needed... so let's take the opportunity to purge old technical debt 😜

python -m iris.tests.runner --default-tests --system-tests;
fi

- if [[ ${TEST_TARGET} == 'example' ]]; then
python -m iris.tests.runner --example-tests --print-failed-images;
python -m iris.tests.runner --example-tests;
fi

# A call to check "whatsnew" contributions are valid, because the Iris test
Expand Down
7 changes: 3 additions & 4 deletions docs/iris/example_code/Meteorology/COP_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ def main():

# Add the first subplot showing the E1 scenario
plt.subplot(121)
plt.title('HadGEM2 E1 Scenario', fontsize=10)
plt.title('HadGEM2 E1 Scenario', fontsize=10)
iplt.contourf(delta_e1, levels, colors=colors, extend='both')
plt.gca().coastlines()
# get the current axes' subplot for use later on
plt1_ax = plt.gca()

# Add the second subplot showing the A1B scenario
plt.subplot(122)
plt.title('HadGEM2 A1B-Image Scenario', fontsize=10)
plt.title('HadGEM2 A1B-Image Scenario', fontsize=10)
contour_result = iplt.contourf(delta_a1b, levels, colors=colors,
extend='both')
plt.gca().coastlines()
Expand All @@ -131,8 +131,7 @@ def main():
width = left - first_plot_left + width

# Add axes to the figure, to place the colour bar
colorbar_axes = fig.add_axes([first_plot_left, bottom + 0.07,
width, 0.03])
colorbar_axes = fig.add_axes([first_plot_left, 0.18, width, 0.03])
Copy link
Member Author

@bjlittle bjlittle Oct 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bottom returned from get_position on line +127 now aligns with the actual bottom of the plot axes - this wasn't the case for matplotlib<3.

The fix here is to explicitly set the bottom of the colorbar_axes to align with this example from matplotlib=2.*


# Add the colour bar
cbar = plt.colorbar(contour_result, colorbar_axes,
Expand Down
Loading