-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
added force_order param in violin FF #755
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
Conversation
@cldougl could you give this a review when you have a minute or two? |
plotly/figure_factory/_violin.py
Outdated
@@ -435,6 +440,8 @@ def create_violin(data, data_header=None, group_header=None, colors=None, | |||
number and will be used to color the violin plots if a colorscale | |||
is being used. | |||
:param (bool) rugplot: determines if a rugplot is draw on violin plot. | |||
:param (bool) forced_order: determines if violins are sorted |
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 would probably call this param sort
plotly/figure_factory/_violin.py
Outdated
@@ -435,6 +440,8 @@ def create_violin(data, data_header=None, group_header=None, colors=None, | |||
number and will be used to color the violin plots if a colorscale | |||
is being used. | |||
:param (bool) rugplot: determines if a rugplot is draw on violin plot. | |||
:param (bool) forced_order: determines if violins are sorted | |||
alphabetically (True) or by inputted order (False). |
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.
input order
@Kully can you add defaults to this doc string (like https://github.com/plotly/plotly.py/blob/master/plotly/figure_factory/_distplot.py#L63-L70). It seems a little confusing to list True before False though False is the default
plotly/figure_factory/_violin.py
Outdated
@@ -627,6 +635,7 @@ def create_violin(data, data_header=None, group_header=None, colors=None, | |||
|
|||
fig = violin_colorscale( | |||
data, data_header, group_header, valid_colors, | |||
use_colorscale, group_stats, rugplot, height, width, title | |||
use_colorscale, group_stats, rugplot, forced_order, height, |
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.
still forced order here
plotly/figure_factory/_violin.py
Outdated
@@ -562,8 +569,7 @@ def create_violin(data, data_header=None, group_header=None, colors=None, | |||
data = data[data_header].values.tolist() | |||
|
|||
# call the plotting functions | |||
plot_data, plot_xrange = violinplot(data, fillcolor=valid_colors[0], | |||
rugplot=rugplot) |
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.
@Kully did you want to take rugplot
out of here?
plotly/figure_factory/_violin.py
Outdated
:param (dict) group_stats: a dictioanry where each key is a unique | ||
value from the group_header column in data. Each value must be a | ||
number and will be used to color the violin plots if a colorscale | ||
is being used. | ||
:param (bool) rugplot: determines if a rugplot is draw on violin plot. | ||
Default = True | ||
:param (bool) sort: determines if violins are sorted. Default = False | ||
alphabetically (True) or by inputted order (False). |
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.
input instead of inputted
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.
@Kully can you put the default at the end, looks like it got added to the middle of the sentence here.
💃 💃 |
Re: #745