Comments (8)
This is the test_image_example
I added today that uses pytest-mpl
.
For some reason the image that was generated on my computer and travis-ci has shape 800 x 600, and @bsipocz, on your computer 880 x 660.
@bsipocz @astrofrog βΒ Any idea what needs to be changed to get reproducible image size on all computers? What's the recommended pattern to do this?
from astroplan.
Differences can be due to differing matplotlibrc files. Can you both check whether you have an active matplotlibrc file?
Ideally I think we should save a JSON dictionary of the RC params with each figure to ensure reproducibility, and it's on my to-do list for pytest-mpl
.
from astroplan.
Good point, indeed I have u'figure.figsize': [8.8, 6.6],
set in rcParams
.
from astroplan.
So what I have is with default setting for matplotlib 1.4.
So those tests would break when matplotlib 2.0 comes out soon with a new style.
@astrofrog β Defining our own plotting style for astroplan should be enough to keep these tests future-proof? (We plan to do this soon: #74) Or what's the recommended pattern to set this up in a robust way?
from astroplan.
Moving this to 0.2 ... it shouldn't block the 0.1 release which is long overdue.
from astroplan.
Pinging @astrofrog again to see if he has a solution to this issue.
from astroplan.
@bmorris3 - I have a solution, in my head, I just haven't had a chance to implement it yet ;)
Though actually for now, you can emulate this solution by resetting the rc parameters to the default at the start of the test:
plt.rcParams.clear()
plt.rcParams.update(plt.rcParamsDefault)
and be sure to re-generate the image.
from astroplan.
Marking Issue as stale and closing. Please re-open if still affected by this Issue.
from astroplan.
Related Issues (20)
- `plot_schedule_airmass` with `show_night=True` is immensely slow
- plot_sky, multiple calls but only one target is shown
- Error in set time calculation HOT 1
- TIME CRITICAL OBSERVATIONS
- Remove deprecated astropy helper functions. HOT 1
- Revisit test matrix: remove python 3.7 HOT 3
- Notice: You might be using enable_deprecations_as_exceptions that is removed in astropy v6 HOT 1
- Deprecation Warnings in observer.moon_rise_time() HOT 1
- plot_sky crashes with matplotlib>v3.4.0 and astroplan v0.8 HOT 5
- TLE Target
- "Tried to do is_equivalent_frame on something that isn't frame-like" error from MoonSeparationConstraint().compute_constraint() HOT 2
- Amount of time HOT 1
- Set labels to data using plot_altitude
- MoonSeparationConstraint issue
- Potential Sunrise/Sunset Discrepancy HOT 6
- Missing targets in plot_airmass and wrong values HOT 5
- Initialize altitude constraint from profile HOT 2
- Observer sun_set_time and sun_rise_time methods crashing
- Astropy 6.0 support HOT 4
- AttributeError: 'AxesSubplot' object has no attribute 'set_theta_zero_location' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from astroplan.