Plotly Python - 更改表格的字体

时间:2017-08-09 08:46:18

标签: python plotly

我有一张我在剧情中制作的表格,我想将字体改为'Gill Sans'。

我无法改变它。这可能吗?

这是我的代码:

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div ng-app="myApp" ng-controller="myCtrl">

  <input style="float:left" type="text" name="input" placeholder="Search for IP.." value="" ng-keyup="filter()" ng-model="textInput">


  <br><br>
  <div ng-repeat="option in filteredArray">
    <input type="checkbox" id="optionId" name="filtered" ng-model="option.status" ng-change="eventListen(option)">
    <label for="optionId">{{option.name}}</label>
  </div>
  <div ng-repeat="option in favorite track by $index" ng-show="afterSelected">
    <input type="button" ng-value="option.name">
  </div>
</div>

1 个答案:

答案 0 :(得分:1)

您需要按https://plot.ly/python/axes/中所述定义布局参数。

在同一页面上,有一个示例代码可以帮助您:

layout = go.Layout(
    xaxis=dict(
        title='AXIS TITLE',
        titlefont=dict(
            family='Arial, sans-serif',
            size=18,
            color='lightgrey'
        ),
        showticklabels=True,
        tickangle=45,
        tickfont=dict(
            family='Old Standard TT, serif',
            size=14,
            color='black'
        ),
        exponentformat='e',
        showexponent='All'
    ),
    yaxis=dict(
        title='AXIS TITLE',
        titlefont=dict(
            family='Arial, sans-serif',
            size=18,
            color='lightgrey'
        ),
        showticklabels=True,
        tickangle=45,
        tickfont=dict(
            family='Old Standard TT, serif',
            size=14,
            color='black'
        ),
        exponentformat='e',
        showexponent='All'
    )
)
fig = go.Figure(data=data, layout=layout)
py.iplot(fig, filename='axes-labels')