Billingegroup / bg-mpl-stylesheets

Matplotlib style sheets
Other
4 stars 27 forks source link

Added requested 'figure.tightlayout' style #28

Closed connorjbracy closed 2 years ago

connorjbracy commented 2 years ago

Closes #18

sbillinge commented 2 years ago

Thanks @connorjbracy . Did you test this to make sure it doesn't break or have unwanted behavior? Not sure how to do that except to run examples in the examples directory.....

connorjbracy commented 2 years ago

Thanks @connorjbracy . Did you test this to make sure it doesn't break or have unwanted behavior? Not sure how to do that except to run examples in the examples directory.....

I did a visual test.

I first ran example/color_cycle.py on master (i.e., before making any changes to bg_mpl_stylesheet/bg_mpl_stylesheet.py).

Then, I reorganized bg_mpl_stylesheet/bg_mpl_stylesheet.py to a human-readable layout and reran the same example to make sure I didn't accidentally alter any settings. I found that both images are byte-wise equivalent (i.e., they have no diff).

Finally, I added the requested feature and reran the example. Obviously this image is necessarily different, but it appears to contain the same information, just in a slightly different layout/format.

01_color_cycle_from_master_before_reformatting_stylesheet 02_color_cycle_after_reformatting_stylesheet 03_color_cycle_after_adding_new_style

sbillinge commented 2 years ago

perfect! looks great.

yevgenyr commented 2 years ago

after working with mpl recently, I found that a tight layout function sometimes causes difficulties and a lack of control. maybe it is better to keep it out and let the user activate it manually.

sbillinge commented 2 years ago

oops, we just merged that....

Thanks for letting us know Yevgeny.

@Connor James Bracy @.***> do you want to revert that change and I can merge it before I do the release.

S

On Fri, Sep 10, 2021 at 12:12 PM Yevgeny Rakita @.***> wrote:

after working with mpl recently, I found that a tight layout function sometimes causes difficulties and a lack of control. maybe it is better to keep it out and let the user activate it manually.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Billingegroup/bg-mpl-stylesheets/pull/28#issuecomment-917027144, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABAOWUMGXRCSJTWKXVNDY5TUBIU5PANCNFSM5DZSO7PQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Simon Billinge Professor, Columbia University Physicist, Brookhaven National Laboratory

yevgenyr commented 2 years ago

Sorry _

On Fri, Sep 10, 2021 at 12:40 PM Simon Billinge @.***> wrote:

oops, we just merged that....

Thanks for letting us know Yevgeny.

@Connor James Bracy @.***> do you want to revert that change and I can merge it before I do the release.

S

On Fri, Sep 10, 2021 at 12:12 PM Yevgeny Rakita @.***> wrote:

after working with mpl recently, I found that a tight layout function sometimes causes difficulties and a lack of control. maybe it is better to keep it out and let the user activate it manually.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub < https://github.com/Billingegroup/bg-mpl-stylesheets/pull/28#issuecomment-917027144 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABAOWUMGXRCSJTWKXVNDY5TUBIU5PANCNFSM5DZSO7PQ

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

-- Simon Billinge Professor, Columbia University Physicist, Brookhaven National Laboratory

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Billingegroup/bg-mpl-stylesheets/pull/28#issuecomment-917046664, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMGCZIH4N5JZMOFJUBFHABDUBIYIZANCNFSM5DZSO7PQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Yevgeny Rakita (Shlafstein), PhD *Columbia University: *Data Science Institute with Applied Physics and Applied Mathematics

Johns Hopkins University: Materials Science and Engineering

sbillinge commented 2 years ago

:) np..... easy to fix

On Fri, Sep 10, 2021 at 12:45 PM Yevgeny Rakita @.***> wrote:

Sorry _

On Fri, Sep 10, 2021 at 12:40 PM Simon Billinge @.***> wrote:

oops, we just merged that....

Thanks for letting us know Yevgeny.

@Connor James Bracy @.***> do you want to revert that change and I can merge it before I do the release.

S

On Fri, Sep 10, 2021 at 12:12 PM Yevgeny Rakita @.***> wrote:

after working with mpl recently, I found that a tight layout function sometimes causes difficulties and a lack of control. maybe it is better to keep it out and let the user activate it manually.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub <

https://github.com/Billingegroup/bg-mpl-stylesheets/pull/28#issuecomment-917027144

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ABAOWUMGXRCSJTWKXVNDY5TUBIU5PANCNFSM5DZSO7PQ

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

-- Simon Billinge Professor, Columbia University Physicist, Brookhaven National Laboratory

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/Billingegroup/bg-mpl-stylesheets/pull/28#issuecomment-917046664 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AMGCZIH4N5JZMOFJUBFHABDUBIYIZANCNFSM5DZSO7PQ

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

-- Yevgeny Rakita (Shlafstein), PhD *Columbia University: *Data Science Institute with Applied Physics and Applied Mathematics

Johns Hopkins University: Materials Science and Engineering

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Billingegroup/bg-mpl-stylesheets/pull/28#issuecomment-917049613, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABAOWUKEP3BWMEB24MO36QDUBIY3TANCNFSM5DZSO7PQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Simon Billinge Professor, Columbia University Physicist, Brookhaven National Laboratory