-
Notifications
You must be signed in to change notification settings - Fork 10
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
Replace broken Plotly plots in widget with matplotlib #17
Conversation
Following a discussion with Victor, the reason that |
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.
This should specify an ipywidgets lower bound of 6.0.0.
At the moment, in the pairwise density, if you try to choose the same column twice, the widget does not update. Maybe we should think of better UX around that?
I don't think this is a blocker here, but we should create a new issue for it.
lens/plotting.py
Outdated
|
||
w = len(columns) * 2.5 | ||
while w > 10: | ||
w /= np.sqrt(1.4) |
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.
Some pretty heavy use of magic numbers here. Why those numbers? What does this do?
I've given this a fairly cursory review, but it looks good, modulo a couple of changes. |
lens/plotting.py
Outdated
@@ -171,6 +171,8 @@ def plot_correlation_mpl(ls, include=None, exclude=None): | |||
|
|||
ax.xaxis.tick_top() | |||
|
|||
# Enforces a width of 2.5 inches per cell in the plot, | |||
# unless this exceeds 600 pixels. |
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.
Where did that 600 pixels number come from?
As a side-note, replacing w
with width_inches
would be a lot clearer.
lens/plotting.py
Outdated
@@ -171,6 +171,8 @@ def plot_correlation_mpl(ls, include=None, exclude=None): | |||
|
|||
ax.xaxis.tick_top() | |||
|
|||
# Enforces a width of 2.5 inches per cell in the plot, | |||
# unless this exceeds 600 pixels. | |||
w = len(columns) * 2.5 | |||
while w > 10: | |||
w /= np.sqrt(1.4) |
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.
Why not just set w = 10
here?
I think this looks good. |
Thanks for the PR, @shwinnn! |
Plotly interactive plots were no longer displayable in HTML widgets as of ipywidgets 6.0.0. Changed plots to use matplotlib allowing them to be displayed in ipython output widgets.
Fixes issue #6