当前位置:网站首页>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)
边栏推荐
- 微博发布案例
- [performance pressure test] how to do a good job of performance pressure test?
- Idea add class annotation template and method template
- Is the test cycle compressed? Teach you 9 ways to deal with it
- Regular e-commerce problems part1
- [SUCTF 2019]Game
- 科技云报道:从Robot到Cobot,人机共融正在开创一个时代
- mysql多列索引(组合索引)特点和使用场景
- Leetcode-226. Invert Binary Tree
- Jenkins远程构建项目超时的问题
猜你喜欢
Explore Cassandra's decentralized distributed architecture
测试周期被压缩?教你9个方法去应对
After 95, Alibaba P7 published the payroll: it's really fragrant to make up this
【数学笔记】弧度
Leetcode-543. Diameter of Binary Tree
Hands on deep learning (IV) -- convolutional neural network CNN
面试结束后,被面试官在朋友圈吐槽了......
misc ez_ usb
[guess-ctf2019] fake compressed packets
自定义类加载器加载网络Class
随机推荐
[2022 ACTF]web题目复现
PHP exports millions of data
2022-07-06:以下go语言代码是否会panic?A:会;B:不会。 package main import “C“ func main() { var ch chan struct
The metauniverse of the platofarm farm continues to expand, with Dao governance as the core
JS plot flot application - simple curve
pytorch 参数初始化
按键精灵采集学习-矿药采集及跑图
242. Bipartite graph determination
Gslx680 touch screen driver source code analysis (gslx680. C)
Tianqing sends instructions to bypass the secondary verification
C语言通信行程卡后台系统
JS get all date or time stamps between two time stamps
探索Cassandra的去中心化分布式架构
CentOS7下安装PostgreSQL11数据库
[experience sharing] how to expand the cloud service icon for Visio
在线直播系统源码,使用ValueAnimator实现view放大缩小动画效果
buuctf misc USB
../ And/
[CV] Wu Enda machine learning course notes | Chapter 8
Wechat applet data binding multiple data