微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在 Rmd knitted 报告中显示 Plotly express 图在 python 块中

如何解决在 Rmd knitted 报告中显示 Plotly express 图在 python 块中

基本上当我运行 python 块(在 Rmd 上使用 reticulate)时,.show() 给出一个带有交互式绘图的新浏览器窗口作为输出

我可以将它集成到针织 rmd 中吗?

py_plot = px.choropleth(data_frame = py_plot_df,locations= "iso_alpha",color= "Confirmed",# the value in the variable 'Confirmed' determines the color
                hover_name= "Country",color_continuous_scale="bluyl",#  through all the color palettes,the dear old Viridis is also available in python!
                animation_frame= "Date")
py_plot.show()

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。