-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add default rcParams
#386
Add default rcParams
#386
Conversation
@eagoetz I tested the following: import matplotlib.pyplot as plt
import numpy as np
import matplotlib as mpl
plt.rcParams["figure.figsize"] = (5,10)
data = np.random.randn(50)
plt.plot(data)
plt.savefig('before_gwsumm.png')
import gwsumm
plt.close('all')
plt.plot(data)
plt.savefig('before_after.png') The saved figures remain unchanged, that is, the "figure.figsize" stays at (5,10) rather than the GWSumm default of (12, 6). |
@iaraota Thanks for trying this out! Have you tried Also, I'm not sure what's going on with the CI failures, but it is likely related to this change. |
84f72d7
to
59f098f
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #386 +/- ##
==========================================
- Coverage 50.17% 49.96% -0.21%
==========================================
Files 60 60
Lines 8685 8729 +44
==========================================
+ Hits 4357 4361 +4
- Misses 4328 4368 +40
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@eagoetz thank you for your suggestion. I tested the following, and the plots remain the same: import matplotlib.pyplot as plt
import numpy as np
import matplotlib as mpl
plt.rcParams["figure.figsize"] = (5,10)
data = np.random.randn(50)
plt.plot(data)
plt.savefig('before_gwsumm.png')
from gwsumm import plot
plot.DataPlot(['L1:DMT-SNSL_EFFECTIVE_RANGE_MPC'], 1388102418, 1388188818)
plt.close('all')
plt.plot(data)
plt.savefig('before_after.png') I fixed the test. It was checking whether |
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.
LGTM
This pull request introduces default
rcParams
, ensuring that plots have the desired appearance without the necessity of activating theligo-summary-3.10
Conda environment.These parameters were obtained by comparing the
matplotlib.rcParams
differences betweenigwn
andligo-summary-3.10
Conda environments.