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

Corr plot module #220

Merged
merged 30 commits into from
Nov 23, 2020
Merged

Corr plot module #220

merged 30 commits into from
Nov 23, 2020

Conversation

IKrukov-HORIS
Copy link
Contributor

No description provided.

This class is intended to build correlation matrix plots.
"""

def __init__(self, data, show_legend=None, flip=None):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets's have: flip=True

self._data = data
self._show_legend = show_legend
self._format = '.2f'
self._reverse_y = flip if flip is not None else True
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True if flip else False
would work.

if color:
other_args['color'] = color
else:
other_args['color'] = self._text_color
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens with text's color if user adds 'tiles' after 'labels'?

python-package/lets_plot/bistro/corr.py Show resolved Hide resolved
python-package/lets_plot/bistro/corr.py Show resolved Hide resolved

return res

def _set_diverging_palette(self, palette):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rename to _set_brewer_palette.


def _set_diverging_palette(self, palette):
self._color_scale = scale_color_brewer(name='Correlation',
type='div',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove type='div'


layers = []

if self._tiles_layer:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use API:

plot = ggplot(self._data)
if self._tiles_layer:
  plot += self._tiles_layer

...

self._text_color = None
self._tiles_layer = None
self._points_layer = None
self._labels_layer = None
self._color_scale = scale_color_gradient2(name='Correlation',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Correlation' takes too much space on the plot, let's call it 'Corr'.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@IKrukov-HORIS IKrukov-HORIS force-pushed the corr_plot_module branch 4 times, most recently from 9149e2f to ebdac2d Compare November 16, 2020 10:28
@alshan alshan merged commit b5c93db into JetBrains:master Nov 23, 2020
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

2 participants