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

wrong colour when second model plots into empty axes #31

Closed
lukashergt opened this issue Jul 14, 2019 · 0 comments · Fixed by #32
Closed

wrong colour when second model plots into empty axes #31

lukashergt opened this issue Jul 14, 2019 · 0 comments · Fixed by #32
Labels
bug Something isn't working

Comments

@lukashergt
Copy link
Collaborator

Describe the bug

A clear and concise description of what the bug is.

Similar to #19 when plotting 2 models it sometimes happens that the colours for the 2nd model aren't consistent due to the colour cycle not being properly updated in the 1st call.

This was introduced through #21 by switching from direct calls to ax.plot([], []) to only passing x=[] (but only to one function).

To Reproduce

ns1 = NestedSamples(root="./tests/example_data/pc")
ns2 = NestedSamples(root="./tests/example_data/pc")
fig, axes = make_2d_axes(['x0', 'x1', 'x2', 'x3'])
ns1.plot_2d(axes=axes, types={'diagonal': None, 'lower': 'kde', 'upper': 'kde'}, label='foo')
ns2.plot_2d(axes=axes, types={'diagonal': 'kde', 'lower': 'kde', 'upper': 'scatter'}, diagonal_kwargs={'ls': '--'}, upper_kwargs={'alpha': 0.3}, label='bar')

image

Expected behavior

In the above image:

  • the dashed lines in the diagonal plots should be orange
  • the scatter plots in the upper plots should be orange

Additional context

  • In the diagonal case this must be due to somehow nothing being drawn in the 1st call where diagonal=None.

  • In the 2D case this has to do with ax.plot and ax.scatter not sharing the same colour cycle, so both have to be called every time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant