-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fix to colouring for missing plots #45
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
47f51a6
Added a failing test
williamjameshandley 10d720f
Clearer test example made by dropping columns
williamjameshandley 9544b67
Added 1D test as well
williamjameshandley 1dd9c69
Split up tests
williamjameshandley f6dbe61
Fixed on local machine
williamjameshandley 61e3f6b
Reverted types change to plot_1d
williamjameshandley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
So far I was using
plot_type
(which is popped insamples.plot
) to decide what kind of 1D plot I want. Now, providing the kwargplot_type
results inCode to reproduce:
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.
Ah, I had noticed that
MCMCSamples.plot_1d
was missing a 'types' argument, in analogy toMCMCSamples.plot_2d
. In this PR I've made them more consistent in preparation for the finer-grained control suggested in #41 .The fix is to pass
types='hist'
rather thanplot_type='hist'
. I acknowledge that this is technically a breaking change, although only to undocumented (and, tbh unknown on my part) functionality.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.
One of the things I'm considering is deprecating the cryptic
types
arguments, with the plan to replace them withsubplot_types
, which is more informative.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.
By the way, the error actually also happens in the 2D case:
Might it be more consistent to allow
plot_type
as a kwarg forplot_2d
that broadcasts the provided string to all subplots?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.
I'm not sure how to fix this, but having
plot_type
andtypes
in parallel like this seems wrong to me. Iftypes
is the one intended to be passed toplot_1d
thenplot_type
should not be a valid kwarg.Not undocumented with #24. Actually,
plot_type
was one of my major motivations for suggesting #24.The thing is,
plot_type
andtypes
don't quite have the same role, so I'm not sure whether this is really more consistent. The need fortypes
arises because in the 2D case we distinguish between 3 different families of plots (diagonal, lower and upper) which all need aplot_type
assignment. This is a 2D specific feature and, thus,types
is unnecessary in the 1D case.Replacing
types
with a more generalsubplot_types
that determines e.g. which plot type for which parameter would be an option. At the same typeplot_type
could be replaced with e.g.default_plot_type
that broadcasts the plot type across all subplots andsubplot_types
can then be used to pick and alter specific parameters.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.
In any case, might it be better to revert this specific change and address all this in a separate PR that targets #41 ?
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.
Agreed, reverted in 61e3f6b