当前位置: 首页 > news >正文

python显示文字框_自定义悬停框Plotly:Python以适应文本

有没有办法自定义悬停文本框的情节?我必须在悬停框中显示的文字很长,不适合在屏幕上显示。是否有方法可以更改悬停文本框的尺寸或使文本变小以使其全部适合屏幕。 更好的方法是在图表侧面显示相应注释的固定框,当我滚动该数据点时,但我不确定如何操作。自定义悬停框Plotly:Python以适应文本

这是我想用一些类似的长度文本做什么的样本。

import plotly.plotly as py

from plotly.graph_objs import *

import plotly

import matplotlib.pyplot as plt

import numpy as np

import pandas as pd

notes=["Clinton is also navigating delicate ties with Israel and the American Jewish community, an influential group of voters and donors. Israeli Prime Minister Benjamin Netanyahu, a fierce critic of the Obama administration's outreach to Iran, described the framework deal as a threat to the very survival of his nation.", "Fire crews in Cambria County were called to the Revloc duplex Friday morning and found much of the building engulfed in flames. Chief Deputy Coroner Jeffrey Leeds said at least seven people were in the duplex and all, but one, were able to get out safely.Witnesses said Jake Lewis, 24, re-entered the house to rescue 65-year-old Anna LaJudice. But father, Robert LaJudice, told The (Altoona) Mirror.Their bodies were later recovered. The deputy coroner said autopsies determined that both died from smoke and gas inhalation.", "As crews worked to tear down the rest of the home, Ott said she planned to attend a church service and say a prayer for the family."]

balance=[1000,2000,4000]

dates=[1,2,3]

data1 = Data([

Scatter(

x=dates,

y=balance,

mode='markers',

text=notes,

)

])

layout = Layout(

title='Hover over the points to see the text',autosize=True,

)

fig = Figure(data=data1, layout=layout,)

fig['layout'].update(

hovermode='closest',

showlegend=False,

autosize=True,

)

plot_url = py.plot(fig, filename='hover-chart-basic')

py.plot(fig, filename='hover-chart-basic')

任何帮助将不胜感激!

相关文章:

  • seay svn漏洞利用工具_roptool 一种帮助您编写二进制漏洞利用的工具
  • springcloud全家桶_Spring cloud 微服务组件 mica 2.0.5GA 发布,添加对sentinel、undertow指标收集。...
  • 查看约束信息_谢菲尔德资源与蚌埠中恒签订“转型”约束钛铁矿承购协议
  • recyclerview item 有选中字体颜色_PPT金属文字怎么插入?PPT模板金属字体制作,PPT金属字体怎么做?...
  • 3d旋转相册代码源码_Qt Data Visualization ,让数据3D可视化
  • asp 执行 exe_Asp.Net Core学习笔记:(五)构建和部署
  • mybatis if test 用法_手写一个简易版的Mybatis,带你深入领略它的魅力
  • python写入excel数据时保存之前内容_如何使用python在保留原excel格式的前提下插入/修改数据...
  • asp.net web开发框架_ASP.NET Core Blazor未来的Web开发框架
  • 操作系统实验c语言页面置换算法(lru和lfu算法)_「任性」的C语言之父:因拒付论文装订费错失博士学位,论文52年后重见天日...
  • python生日快乐代码_【震惊小伙伴的单行代码—Python篇】的实践操作
  • c3p0连接池配置_数据库连接池amp;Spring JDBC(JdbcTemplate)
  • cdr自动排版插件_牛逼!网上卖328的CorelDraw插件免费送一键转曲批量导图文字识别...
  • python最接近某个值怎么表示_在python3中实现查找数组中最接近与某值的元素操作...
  • java连接rabbitmq_RabbitMQ指南之一:Hello World!
  • $translatePartialLoader加载失败及解决方式
  • [NodeJS] 关于Buffer
  • 《Java编程思想》读书笔记-对象导论
  • DOM的那些事
  • Javascript弹出层-初探
  • k8s如何管理Pod
  • Laravel5.4 Queues队列学习
  • mysql 5.6 原生Online DDL解析
  • node和express搭建代理服务器(源码)
  • spring boot 整合mybatis 无法输出sql的问题
  • Spring核心 Bean的高级装配
  • Sublime text 3 3103 注册码
  • windows下使用nginx调试简介
  • 程序员最讨厌的9句话,你可有补充?
  • 反思总结然后整装待发
  • 工作手记之html2canvas使用概述
  • 用Node EJS写一个爬虫脚本每天定时给心爱的她发一封暖心邮件
  • 机器人开始自主学习,是人类福祉,还是定时炸弹? ...
  • 容器镜像
  • #Linux(帮助手册)
  • #stm32驱动外设模块总结w5500模块
  • (09)Hive——CTE 公共表达式
  • (2)nginx 安装、启停
  • (Demo分享)利用原生JavaScript-随机数-实现做一个烟花案例
  • (Mirage系列之二)VMware Horizon Mirage的经典用户用例及真实案例分析
  • (附源码)node.js知识分享网站 毕业设计 202038
  • (附源码)spring boot北京冬奥会志愿者报名系统 毕业设计 150947
  • (一)ClickHouse 中的 `MaterializedMySQL` 数据库引擎的使用方法、设置、特性和限制。
  • (一)spring cloud微服务分布式云架构 - Spring Cloud简介
  • (转)linux自定义开机启动服务和chkconfig使用方法
  • .dat文件写入byte类型数组_用Python从Abaqus导出txt、dat数据
  • .gitignore文件---让git自动忽略指定文件
  • .NET MVC之AOP
  • .net图片验证码生成、点击刷新及验证输入是否正确
  • [ vulhub漏洞复现篇 ] ThinkPHP 5.0.23-Rce
  • [100天算法】-x 的平方根(day 61)
  • [Android Pro] listView和GridView的item设置的高度和宽度不起作用
  • [C#]winform制作圆形进度条好用的圆环圆形进度条控件和使用方法
  • [C/C++]数据结构----顺序表的实现(增删查改)
  • [CCIE历程]CCIE # 20604