<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          D3py基于 D3 的 Python 繪圖庫

          聯(lián)合創(chuàng)作 · 2023-09-29 16:32

          D3py 是一個基于 D3 的 Python 繪圖庫,可以像 D3 那樣畫出可交互的漂亮圖形。

          D3py 的目的是把來自命令行或者腳本的數(shù)據(jù)畫到瀏覽器窗口,d3py 通過構(gòu)建兩個優(yōu)秀的包來實現(xiàn)這一點。 第一個是 d3.js(Mike Bostock),它是一個用于創(chuàng)建數(shù)據(jù)驅(qū)動文檔的 JavaScript 庫,允許將任意 svg 放置到瀏覽器窗口中。 第二個是使用 DataFrame 數(shù)據(jù)結(jié)構(gòu)的 pandas Python 模塊(Wes Mckinney)。

          示例

          import d3py
          import pandas
          import numpy as np
          
          # some test data
          T = 100
          # this is a data frame with three columns (we only use 2)
          df = pandas.DataFrame({
              "time" : range(T),
              "pressure": np.random.rand(T),
              "temp" : np.random.rand(T)
          })
          ## build up a figure, ggplot2 style
          # instantiate the figure object
          fig = d3py.PandasFigure(df, name="basic_example", width=300, height=300) 
          # add some red points
          fig += d3py.geoms.Point(x="pressure", y="temp", fill="red")
          # writes 3 files, starts up a server, then draws some beautiful points in Chrome
          fig.show()
          瀏覽 28
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  91无码人妻一区二区 | 特级精品在线 | 极品久久久久久久 | 91在线无码精品秘 入口楼乃 | 超碰免费操大逼 |