在一个函数中运行plotly.plotly.iplot(),没有显示图表

时间:2017-08-16 03:35:46

标签: python jupyter

select All
<input type="checkbox" name="all"> <br>
<table id="example1" class="display table table-bordered table-striped" width="100%">
    <thead>
        <tr style="background-color: rgba(60, 141, 188, 0.5);">
            <th>Finger Id</th>
            <th>NIK</th>
            <th>Nama Staff</th>
            <th>Departement</th>
            <th>Jabatan</th>
            <th>Action</th>
        </tr>
    </thead>
<tbody>
    <tr style="background-color: rgba(60, 141, 188, 0.5);">
            <td>Finger Id</td>
            <td>NIK</td>
            <td>Nama Staff</td>
            <td>Departement</td>
            <td>Jabatan</td>
            <td><input type="checkbox"></td>
        </tr>           
        <tr style="background-color: rgba(60, 141, 188, 0.5);">
            <td>Finger Id</td>
            <td>NIK</td>
            <td>Nama Staff</td>
            <td>Departement</td>
            <td>Jabatan</td>
            <td><input type="checkbox"></td>
        </tr>           
        <tr style="background-color: rgba(60, 141, 188, 0.5);">
            <td>Finger Id</td>
            <td>NIK</td>
            <td>Nama Staff</td>
            <td>Departement</td>
            <td>Jabatan</td>
            <td><input type="checkbox"></td>
        </tr>           
        <tr style="background-color: rgba(60, 141, 188, 0.5);">
            <td>Finger Id</td>
            <td>NIK</td>
            <td>Nama Staff</td>
            <td>Departement</td>
            <td>Jabatan</td>
            <td><input type="checkbox"></td>
        </tr>           
        <tr style="background-color: rgba(60, 141, 188, 0.5);">
            <td>Finger Id</td>
            <td>NIK</td>
            <td>Nama Staff</td>
            <td>Departement</td>
            <td>Jabatan</td>
            <td><input type="checkbox"></td>
        </tr>           
        <tr style="background-color: rgba(60, 141, 188, 0.5);">
            <td>Finger Id</td>
            <td>NIK</td>
            <td>Nama Staff</td>
            <td>Departement</td>
            <td>Jabatan</td>
            <td><input type="checkbox"></td>
        </tr>           
        <tr style="background-color: rgba(60, 141, 188, 0.5);">
            <td>Finger Id</td>
            <td>NIK</td>
            <td>Nama Staff</td>
            <td>Departement</td>
            <td>Jabatan</td>
            <td><input type="checkbox"></td>
        </tr>           
        <tr style="background-color: rgba(60, 141, 188, 0.5);">
            <td>Finger Id</td>
            <td>NIK</td>
            <td>Nama Staff</td>
            <td>Departement</td>
            <td>Jabatan</td>
            <td><input type="checkbox"></td>
        </tr>           
        <tr style="background-color: rgba(60, 141, 188, 0.5);">
            <td>Finger Id</td>
            <td>NIK</td>
            <td>Nama Staff</td>
            <td>Departement</td>
            <td>Jabatan</td>
            <td><input type="checkbox"></td>
        </tr>           
    </tbody>
</table>

如上所示,如果我使用myplot功能,则不会显示图表。但如果我直接使用py.iplot,则显示图表。任何人都可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

只需添加

py.init_notebook_mode(connected=True)