1. <tfoot id='sh2Wd'></tfoot>

    2. <small id='sh2Wd'></small><noframes id='sh2Wd'>

      <legend id='sh2Wd'><style id='sh2Wd'><dir id='sh2Wd'><q id='sh2Wd'></q></dir></style></legend>

      <i id='sh2Wd'><tr id='sh2Wd'><dt id='sh2Wd'><q id='sh2Wd'><span id='sh2Wd'><b id='sh2Wd'><form id='sh2Wd'><ins id='sh2Wd'></ins><ul id='sh2Wd'></ul><sub id='sh2Wd'></sub></form><legend id='sh2Wd'></legend><bdo id='sh2Wd'><pre id='sh2Wd'><center id='sh2Wd'></center></pre></bdo></b><th id='sh2Wd'></th></span></q></dt></tr></i><div id='sh2Wd'><tfoot id='sh2Wd'></tfoot><dl id='sh2Wd'><fieldset id='sh2Wd'></fieldset></dl></div>
        <bdo id='sh2Wd'></bdo><ul id='sh2Wd'></ul>

      1. plotly.offline.iplot 在 Jupyter Notebook/Lab 中提供一个大的空白字段作为其输出

        时间:2023-09-28

            <tbody id='swZXH'></tbody>
            <legend id='swZXH'><style id='swZXH'><dir id='swZXH'><q id='swZXH'></q></dir></style></legend>
              <bdo id='swZXH'></bdo><ul id='swZXH'></ul>

                <tfoot id='swZXH'></tfoot>

                1. <small id='swZXH'></small><noframes id='swZXH'>

                2. <i id='swZXH'><tr id='swZXH'><dt id='swZXH'><q id='swZXH'><span id='swZXH'><b id='swZXH'><form id='swZXH'><ins id='swZXH'></ins><ul id='swZXH'></ul><sub id='swZXH'></sub></form><legend id='swZXH'></legend><bdo id='swZXH'><pre id='swZXH'><center id='swZXH'></center></pre></bdo></b><th id='swZXH'></th></span></q></dt></tr></i><div id='swZXH'><tfoot id='swZXH'></tfoot><dl id='swZXH'><fieldset id='swZXH'></fieldset></dl></div>
                  本文介绍了plotly.offline.iplot 在 Jupyter Notebook/Lab 中提供一个大的空白字段作为其输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试在 Jupyter 笔记本中创建一个桑基图,我的代码基于 运行笔记本中的所有单元后,终端如下所示:

                  有人可以指出我在这里出错的地方吗?

                  • 我还在 plotly 论坛上发布了这个问题:https://community.plot.ly/t/no-output-from-plotly-offline-iplot/8086 -

                  解决方案

                  过去我在 Jupyter 中的 plotly 离线时也遇到过类似的问题 - 有时当/为什么情节无法出现时会出人意料地不一致.从提高数据速率限制开始可能值得一试.

                  jupyter notebook --NotebookApp.iopub_data_rate_limit=1.0e10

                  I am trying to create a Sankey chart in a Jupyter notebook, basing my code on the first example shown here.

                  I ended up with this, which I can run without getting any errors:

                  import numpy as npy
                  import pandas as pd
                  import plotly as ply
                  
                  ply.offline.init_notebook_mode(connected=True)
                  
                  df = pd.read_csv('C:\Users\a245401\Desktop\Test.csv',sep=';')
                  
                  print(df.head())
                  print(ply.__version__)
                  
                  data_trace = dict(
                      type='sankey',
                      domain = dict(
                        x =  [0,1],
                        y =  [0,1]
                      ),
                      orientation = "h",
                      valueformat = ".0f",
                      node = dict(
                        pad = 10,
                        thickness = 30,
                        line = dict(
                          color = "black",
                          width = 0.5
                        ),
                        label =  df['Node, Label'].dropna(axis=0, how='any'),
                        color = df['Color']
                      ),
                      link = dict(
                        source = df['Source'].dropna(axis=0, how='any'),
                        target = df['Target'].dropna(axis=0, how='any'),
                        value = df['Value'].dropna(axis=0, how='any'),
                    )
                  )
                  print(data_trace)
                  
                  layout =  dict(
                      title = "Test",
                      height = 772,
                      width = 950,
                      font = dict(
                        size = 10
                      ),    
                  )
                  print(layout)
                  
                  fig = dict(data=[data_trace], layout=layout)
                  ply.offline.iplot(fig, filename='Test')
                  

                  With the csv-file looking like this:

                  Source;Target;Value;Color;Node, Label
                  0;2;2958.5;#262C46;Test 1
                  0;2;236.7;#262C46;Test 2
                  0;2;1033.4;#262C46;Test 3
                  0;2;58.8;#262C46;Test 4
                  0;2;5.2;#262C46;Test 5
                  0;2;9.4;#262C46;Test 6
                  0;2;3.4;#262C46;Test 7
                  

                  It seems to run fine, with the various outputs looking right at a first glance, but the final output from ply.offline.iplot(fig, filename='Test') just shows a large blank field: The terminal looks like this after having run all the cells in the notebook once:

                  Can someone please point me to where I am going wrong here?

                  • edit: I also posted this question on the plotly forums: https://community.plot.ly/t/no-output-from-plotly-offline-iplot/8086 -

                  解决方案

                  I have had similar issues with plotly offline in Jupyter in the past - sometimes it's surprisingly inconsistent when/why the plots fail to appear. It may be worth a try starting with an increased data rate limit.

                  jupyter notebook --NotebookApp.iopub_data_rate_limit=1.0e10

                  这篇关于plotly.offline.iplot 在 Jupyter Notebook/Lab 中提供一个大的空白字段作为其输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何在 Plotly for Python 中悬停时突出显示整个跟踪? 下一篇:Plotly:具有多个轴的分组条形图

                  相关文章

                    <tfoot id='kT0Na'></tfoot>

                  1. <i id='kT0Na'><tr id='kT0Na'><dt id='kT0Na'><q id='kT0Na'><span id='kT0Na'><b id='kT0Na'><form id='kT0Na'><ins id='kT0Na'></ins><ul id='kT0Na'></ul><sub id='kT0Na'></sub></form><legend id='kT0Na'></legend><bdo id='kT0Na'><pre id='kT0Na'><center id='kT0Na'></center></pre></bdo></b><th id='kT0Na'></th></span></q></dt></tr></i><div id='kT0Na'><tfoot id='kT0Na'></tfoot><dl id='kT0Na'><fieldset id='kT0Na'></fieldset></dl></div>
                    <legend id='kT0Na'><style id='kT0Na'><dir id='kT0Na'><q id='kT0Na'></q></dir></style></legend>
                    • <bdo id='kT0Na'></bdo><ul id='kT0Na'></ul>

                    <small id='kT0Na'></small><noframes id='kT0Na'>