Skip to content

categoryorder in python bar chart #112

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 2 commits into from
Aug 15, 2019
Merged

categoryorder in python bar chart #112

merged 2 commits into from
Aug 15, 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

closes plotly/documentation#1450

@Mahdis-z Mahdis-z requested a review from michaelbabyn August 14, 2019 20:26
Copy link
Contributor

@michaelbabyn michaelbabyn left a comment

Choose a reason for hiding this comment

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

I suggested a few minor changes but overall this looks good to me so 💃 after the revisions.

@@ -326,6 +326,36 @@ fig.update_layout(barmode='relative', title_text='Relative Barmode')
fig.show()
```

#### Ordering Categorical Variables

Set `categoryorder` to "category ascendin/descending" for the alphanumerical order of the category names or "total ascending/descending" for numerical order of values. [categoryorder](https://plot.ly/python/reference/#layout-xaxis-categoryorder) for more information.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Set `categoryorder` to "category ascendin/descending" for the alphanumerical order of the category names or "total ascending/descending" for numerical order of values. [categoryorder](https://plot.ly/python/reference/#layout-xaxis-categoryorder) for more information.
Set `categoryorder` to "category ascending/descending" for the alphanumerical order of the category names or "total ascending/descending" for numerical order of values. [categoryorder](https://plot.ly/python/reference/#layout-xaxis-categoryorder) for more information.

@@ -326,6 +326,36 @@ fig.update_layout(barmode='relative', title_text='Relative Barmode')
fig.show()
```

#### Ordering Categorical Variables
Copy link
Contributor

Choose a reason for hiding this comment

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

we should use a header 3 hear not a header 4 (now there is a difference so this will look small).

Suggested change
#### Ordering Categorical Variables
### Ordering Categorical Variables

@Mahdis-z Mahdis-z merged commit 2b32640 into master Aug 15, 2019
@Mahdis-z Mahdis-z deleted the categoryorder branch August 15, 2019 18:37
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.

categoryorder python examples
2 participants