Skip to content

Parallel category V4 #106

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

Merged
merged 3 commits into from
Jul 24, 2019
Merged

Parallel category V4 #106

merged 3 commits into from
Jul 24, 2019

Conversation

Mahdis-z
Copy link
Contributor

Doc upgrade checklist:

  • file has been moved from unconverted/x/y.md to x/y.md
  • old boilerplate at top and bottom of file has been removed
  • Every example is independently runnable and is optimized for short line count
  • no more plot() or iplot()
  • graph_objs has been renamed to graph_objects
  • fig = <something> call is high up in each example
  • minimal creation of intermediate trace objects
  • liberal use of add_trace and update_layout
  • fig.show() at the end of each example
  • px example at the top if appropriate
  • minimize usage of hex codes for colors in favour of those in https://github.com/plotly/plotly.py-docs/issues/14

@Mahdis-z
Copy link
Contributor Author

tips = px.data.tips()
fig = px.parallel_categories(tips, dimensions=['sex', 'smoker', 'day'],
color="size", color_continuous_scale=px.colors.sequential.Inferno,
labels={'sex':'SEX', 'smoker':'SMOKER', 'day':'DAY'})
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's do something more interesting than just capitalize them ... how about "Payer Sex", "Smokers at the table" and "Day of week"?

)

iplot([parcats])
fig = go.Figure(parcats)
Copy link
Contributor

Choose a reason for hiding this comment

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

you don't need the intermediate variable here, please just inline the trace in the figure.

@@ -97,7 +105,8 @@ parcats = go.Parcats(
counts=[6, 10, 40, 23, 7]
)

iplot([parcats])
fig = go.Figure(parcats)
Copy link
Contributor

Choose a reason for hiding this comment

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

again, please inline.

@Mahdis-z Mahdis-z requested a review from nicolaskruchten July 24, 2019 15:09
@nicolaskruchten
Copy link
Contributor

Looks great!
💃

@Mahdis-z Mahdis-z merged commit c5ad978 into master Jul 24, 2019
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.

2 participants