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

fixed legend for non-faceted graphs; added shared-axis-label feature #650

Merged
merged 4 commits into from
Feb 15, 2023

Conversation

Magnus167
Copy link
Member

@Magnus167 Magnus167 commented Feb 7, 2023

The new behaviour implies that faceted graphs will not have a legend printed; since they would have only 1 XCAT with multiple CIDS, or vice-versa.

To understand the shared-axis-labels behaviour, view the last two example calls to pnl.plot_pnls() in naive_pnl.py:

pnl.plot_pnls(  pnl_cats=["PNL_GROWTH_NEG"], 
                pnl_cids=cids,
                facet=True,
                xcat_labels=None
                )
# new options : 
pnl.plot_pnls(  pnl_cats=["PNL_GROWTH_NEG"], 
                same_y=True,
                pnl_cids=cids,
                facet=True,
                xcat_labels=None,
                share_axis_labels=False,
                x_axis_label='Date',
                y_axis_label='PnL',
                y_label_adj=0.1,)
                    

@codecov-commenter
Copy link

Codecov Report

Base: 59.03% // Head: 59.21% // Increases project coverage by +0.18% 🎉

Coverage data is based on head (53ab1a1) compared to base (5724b92).
Patch coverage: 5.55% of modified lines in pull request are covered.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #650      +/-   ##
===========================================
+ Coverage    59.03%   59.21%   +0.18%     
===========================================
  Files           28       29       +1     
  Lines         2990     3050      +60     
===========================================
+ Hits          1765     1806      +41     
- Misses        1225     1244      +19     
Impacted Files Coverage Δ
macrosynergy/pnl/naive_pnl.py 55.90% <5.55%> (-1.25%) ⬇️
macrosynergy/panel/linear_composite.py 77.35% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Magnus167 Magnus167 changed the title fixed legend for non-faceted graphs. fixed legend for non-faceted graphs; added shared-axis-label feature Feb 7, 2023
@rsueppel rsueppel merged commit d5c7fba into develop Feb 15, 2023
@rsueppel rsueppel deleted the bugfix/naivepnl_facet_plots branch February 15, 2023 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants