Getting data from an excel sheet

Hi, if I want numbers up the yaxis, do I need a field for this in the excel file?

Or can I crate one in a plotly chart independent of the excel file

Hi thanks for this, but I just need to do it jupyter notebook. Not dash. Is this possible?
Thanks

O I see. I was hoping to use plotly and jupyter notebook. I thought this was the plotly forum? I am on my phone but may have pressed the wrong forum.
Thanks

FREDDY33
Yes, this forum is for ploty so sorry for give you info from Dash.

You can use plotly with jupyter notebook.

Take a look this information:

Hi, thank you. Thatโ€™s actually very helpful and I have bookmarked it. I have also read through it but still unsure how I create a number scale up the y axis.

data = [go.Bar(x=df.School,
y=df.Gap)]

The gap is numbers that go up the side, but these numbers are in the csv file. Iโ€™m wondering if there is a way to create numbers in the y axis without pulling the data from a csv file, or do I need to include this in the excel file?

Thanks

Basically Iโ€™m a bit unsure how I add numbers. I think I need to rewrite my whole excel sheet. Because I donโ€™t have anything that gives the total values if that makes sense.

When I get home I will post a screenshot.

Thanks

Hello FREDDY33

Here you have a example using a range. I hope that goin to be useful.

# imports
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
import pandas as pd
import plotly.graph_objs as go
import numpy as np

# setup
init_notebook_mode(connected=True)

# data
np.random.seed(4)
x = np.linspace(0, 1, 50)
y = np.cumsum(np.random.randn(50))

# line
trace = go.Scatter(
    x=x,
    y=y,
)

# layout
layout = go.Layout(yaxis=dict(range=[-4,4])
)

# Plot
fig = go.Figure(data=[trace], layout=layout)
iplot(fig)

Hi, thanks for this, this works really well.


This: `layout = go.Layout(yaxis=dict(range=[0, 10])

Thanks for all the help on this, its appreciated.

1 Like

Im sure i wrote this?