In [6]:
import pandas as pd
In [7]:
df=pd.read_hdf('./data/premixed_raw.H5')
In [8]:
df.columns
Out[8]:
In [9]:
# Plotly
import plotly.offline as pyoff
import plotly.tools as tls
import pandas as pd
In [32]:
df_s=df.sample(frac=0.1)
fig_db = {
'data': [
{
'x': df_s['f'],
'y': df_s['PV'],
'z': df_s['T'],
'type':'scatter3d',
'mode': 'markers',
'marker':{
'size':1
}
}
],
'layout': {
'scene':{
'xaxis':{'title':'adfasdf'},
'yaxis': {'title': "Life Expectancy"},
'zaxis': {'title': "Life Expectancy2"}
}
}
pyoff.iplot(fig_db, filename='multiple-scatter')
In [1]:
import plotly.io as pio
In [21]:
import plotly.graph_objs as go
trace0 = go.Scatter(
x = [0,1,1,0,0,1,1,2,2,3,3,2,2,3],
y = [0,0,1,1,3,3,2,2,3,3,1,1,0,0]
)
trace1 = go.Scatter(
x = [0,1,2,3],
y = [1,2,4,8],
yaxis = "y2"
)
trace2 = go.Scatter(
x = [1,10,100,10,1],
y = [0,1,2,3,4],
xaxis = "x2",
yaxis ="y3",
)
trace3 = go.Scatter(
x = [1,100,30,80,1],
y = [1,1.5,2,2.5,3],
xaxis = "x2",
yaxis = "y4"
)
data = [trace0,trace1,trace2,trace3]
layout = go.Layout(
width = 800,
height = 500,
title = "fixed-ratio axes",
xaxis = dict(
nticks = 10,
domain = [0, 0.45],
title = "shared X axis"
),
yaxis = dict(
scaleanchor = "x",
domain = [0, 0.45],
title = "1:1"
),
yaxis2 = dict(
scaleanchor = "x",
scaleratio = 0.2,
domain = [0.55,1],
title = "1:5"
),
xaxis2 = dict(
type = "log",
domain = [0.55, 1],
anchor = "y3",
title = "unconstrained log X"
),
yaxis3 = dict(
domain = [0, 0.45],
anchor = "x2",
title = "Scale matches ->"
),
yaxis4 = dict(
scaleanchor = "y3",
domain = [0.55, 1],
anchor = "x2",
title = "Scale matches <-"
),
showlegend= False
)
fig = go.Figure(data=data, layout=layout)
pyoff.iplot(fig, filename = "aspect-ratio")
In [22]:
data
Out[22]:
In [28]:
fig_db['data']
Out[28]:
In [ ]: