当前位置:网站首页>dash plotly
dash plotly
2022-07-07 07:50:00 【SyncStudy】
from dash import Dash, dcc, html
import pandas as pd
app = Dash(name)
df = pd.read_csv (‘robot.txt’, sep =’ ')
df2 = df.set_axis([‘Time’, ‘Power’, ‘Robot’], axis=1, inplace=False)
print(df2[‘Time’])
app.layout = html.Div([
dcc.Graph(
figure=dict(
data=[
dict(
x=df2[‘Time’],
y=df2[‘Power’].loc[df2[‘Robot’]‘robot1’],#df.loc[df[‘column_name’] == some_value]
name=‘Robot 1’,
marker=dict(
color=‘rgb(55, 83, 109)’
)
),
dict(
x=df2[‘Time’],
y=df2[‘Power’].loc[df2[‘Robot’]‘robot2’],#df.loc[df[‘column_name’] == some_value]
name=‘Robot 2’,
marker=dict(
color=‘rgb(26, 118, 255)’
)
)
],
layout=dict(
title=‘Robot Power’,
showlegend=True,
legend=dict(
x=0,
y=1.0
),
margin=dict(l=40, r=0, t=40, b=30)
)
),
style={‘height’: 300},
id=‘my-graph’
)
])
if name == ‘main’:
app.run_server(debug=True)
边栏推荐
- 图解GPT3的工作原理
- Pytest+allure+jenkins installation problem: pytest: error: unrecognized arguments: --alluredir
- IO流 file
- Technology cloud report: from robot to Cobot, human-computer integration is creating an era
- 海思芯片(hi3516dv300)uboot镜像生成过程详解
- Button wizard collection learning - mineral medicine collection and running map
- [2022 ACTF]web题目复现
- [2022 ciscn] replay of preliminary web topics
- JSON introduction and JS parsing JSON
- Leetcode-226. Invert Binary Tree
猜你喜欢
随机推荐
解决:Could NOT find KF5 (missing: CoreAddons DBusAddons DocTools XmlGui)
Resource create package method
Tongda injection 0day
Pytorch parameter initialization
Asemi rectifier bridge rs210 parameters, rs210 specifications, rs210 package
Technology cloud report: from robot to Cobot, human-computer integration is creating an era
Common validation comments
Figure out the working principle of gpt3
Mysql高低版本切换需要修改的配置5-8(此处以aicode为例)
[2022 CISCN]初赛 web题目复现
[performance pressure test] how to do a good job of performance pressure test?
Why is the row of SQL_ The ranking returned by number is 1
Why should we understand the trend of spot gold?
numpy中dot函数使用与解析
Write CPU yourself -- Chapter 9 -- learning notes
C语言航班订票系统
[P2P] local packet capturing
A bit of knowledge - about Apple Certified MFI
1140_ SiCp learning notes_ Use Newton's method to solve the square root
[mathematical notes] radian