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

Traceplot legend #1070

Merged
merged 13 commits into from
Mar 1, 2020
Merged

Traceplot legend #1070

merged 13 commits into from
Mar 1, 2020

Conversation

OriolAbril
Copy link
Member

@OriolAbril OriolAbril commented Feb 16, 2020

Description

Fixes #837. Allows customization of properties to distinguish lines in the same subplot with all combinations of combine and compact. Introduces arguments compact_prop and chain_prop with format (property_name, (value1, value2...)) to set color, linestyle, linewidth...

Matplotlib version is kind of working, only labels are missing, plot format is OK. Bokeh is still more preliminar. It would also be interesting to implement interactive legends in bokeh for traceplot, but I currently do not plan to do this here.

Checklist

  • Follows official PR format
  • New features are properly documented (with an example if appropriate)?
  • Includes new or updated tests to cover the new feature
  • Code style correct (follows pylint and black guidelines)
  • Changes are listed in changelog

@OriolAbril
Copy link
Member Author

Current behaviour:

  1. combined=False, compact=False (default)

image

  1. combined=True, compact=False

image

  1. combined=False, compact=True

image

  1. combined=True, compact=True

image

How does this look? cc @canyon289 @julian-pani

@OriolAbril OriolAbril force-pushed the traceplot_legend branch 2 times, most recently from 43a02ba to 0191a8d Compare February 21, 2020 23:00
@codecov-io
Copy link

codecov-io commented Feb 21, 2020

Codecov Report

Merging #1070 into master will decrease coverage by 2.25%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1070      +/-   ##
==========================================
- Coverage   93.50%   91.24%   -2.26%     
==========================================
  Files          93       93              
  Lines        8773     8900     +127     
==========================================
- Hits         8203     8121      -82     
- Misses        570      779     +209     
Impacted Files Coverage Δ
arviz/data/io_pystan.py 56.14% <0.00%> (-42.88%) ⬇️
arviz/plots/backends/__init__.py 29.11% <0.00%> (-20.26%) ⬇️
arviz/data/io_emcee.py 93.33% <0.00%> (-5.00%) ⬇️
arviz/plots/backends/bokeh/distplot.py 84.31% <0.00%> (-3.93%) ⬇️
arviz/data/io_cmdstanpy.py 100.00% <0.00%> (ø) ⬆️
arviz/plots/backends/matplotlib/forestplot.py 96.53% <0.00%> (+0.01%) ⬆️
arviz/plots/plot_utils.py 94.82% <0.00%> (+0.08%) ⬆️
arviz/plots/backends/bokeh/forestplot.py 92.88% <0.00%> (+0.02%) ⬆️
arviz/stats/stats_utils.py 91.46% <0.00%> (+0.02%) ⬆️
arviz/data/inference_data.py 83.13% <0.00%> (+0.06%) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d57b851...408d8fb. Read the comment docs.

@OriolAbril OriolAbril changed the title [WIP] Traceplot legend Traceplot legend Feb 28, 2020
@OriolAbril OriolAbril force-pushed the traceplot_legend branch 2 times, most recently from c5221f2 to 3867ce1 Compare February 29, 2020 14:50
@OriolAbril OriolAbril merged commit 0b9140d into master Mar 1, 2020
@OriolAbril OriolAbril deleted the traceplot_legend branch March 1, 2020 18:50
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.

plot_trace with combined=True to have alternating colors and labels
2 participants