Skip to content

[MRG] Bar chart notebook #1

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 9 commits into from
Jun 21, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
hovertext
  • Loading branch information
emmanuelle committed Jun 14, 2019
commit 96a8e4253df5251f91b1039931b38baf11913325
14 changes: 12 additions & 2 deletions notebooks/bar-charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ jupyter:
display_name: Python 3
language: python
name: python3
language_info:
codemirror_mode:
name: ipython
version: 3
file_extension: .py
mimetype: text/x-python
name: python
nbconvert_exporter: python
pygments_lexer: ipython3
version: 3.6.7
plotly:
description: How to make Bar Charts in Python with Plotly.
display_as: basic
Expand Down Expand Up @@ -139,9 +149,9 @@ import plotly.graph_objs as go
x = ['Product A', 'Product B', 'Product C']
y = [20, 14, 23]

# Use the text kw argument for hover text
# Use the hovertext kw argument for hover text
fig = go.Figure(data=[go.Bar(x=x, y=y,
text=['27% market share', '24% market share', '19% market share'])])
hovertext=['27% market share', '24% market share', '19% market share'])])
# Customize aspect
fig.update_traces(marker_color='rgb(158,202,225)', marker_line_color='rgb(8,48,107)',
marker_line_width=1.5, opacity=0.6)
Expand Down