• <tfoot id='5oQ02'></tfoot>

    <small id='5oQ02'></small><noframes id='5oQ02'>

          <bdo id='5oQ02'></bdo><ul id='5oQ02'></ul>
        <legend id='5oQ02'><style id='5oQ02'><dir id='5oQ02'><q id='5oQ02'></q></dir></style></legend>

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

        如何搜索绘图图形的特定属性的选项?

        How can I search for the options for a particular property of a plotly figure?(如何搜索绘图图形的特定属性的选项?)
      2. <small id='fcHuT'></small><noframes id='fcHuT'>

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

                  本文介绍了如何搜索绘图图形的特定属性的选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  The question

                  In the figure below, the jagged shape of the line is set using 'hvh' as an argument for the shape property of the line. As a specific example for a more general case, let's say that I've forgotten which porperty (or properites) that take 'hvh' as an argument. How can I search through the entire plotly figure to find it?

                  Plot:

                  Code:

                  #imports
                  import plotly.plotly as py
                  import plotly.graph_objs as go
                  from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
                  
                  import numpy as np
                  import pandas as pd
                  # Notebook settings
                  init_notebook_mode(connected=True)
                  
                  # Some sample data
                  x = np.random.normal(50, 5, 500)
                  binned = np.histogram(x, bins=25, density=True)
                  plot_y = np.cumsum(binned[0])
                  
                  # Line
                  trace1 = go.Scatter(
                      x=binned[1],
                      y=plot_y,
                      mode='lines',
                      name="X",
                      hoverinfo='all',
                      line=dict(color = 'rgb(1255, 0, 0)', shape='hvh'
                      )
                  )
                  
                  data = [trace1]
                  
                  # Layout
                  layout = dict(title = 'Where is hvh?',
                      legend=dict(
                          y=0.5,
                          traceorder='reversed',
                          font=dict(
                              size=16
                          )
                      )
                  )
                  
                  # Make figure
                  fig = dict(data=data, layout=layout)
                  
                  # Plot
                  iplot(fig, filename='line-shapes')
                  

                  The details:

                  The shape is obtained using line=dict(color = 'rgb(1255, 0, 0)', shape='hvh'. And if you simply run fig, it will return a dict where you can see where the argument is applied to the figure:

                  {'data': [Scatter({
                        'hoverinfo': 'all',
                        'line': {'color': 'rgb(1255, 0, 0)', 'shape': 'hvh'},
                        'mode': 'lines',
                        'name': 'X',
                        'x': array([35.36954648,
                  [...]
                  

                  Let's say that I'd like to know what other propoerties of a an iplot figure that can take 'hvh' or any other string as an argument, how can I search for that? I happen to know that 'hvh' shows up in the output from help(trace1['line'])

                  shape
                   |      Determines the line shape. With "spline" the lines are drawn
                   |      using spline interpolation. The other available values
                   |      correspond to step-wise line shapes.
                   |      
                   |      The 'shape' property is an enumeration that may be specified as:
                   |        - One of the following enumeration values:
                   |              ['linear', 'spline', 'hv', 'vh', 'hvh', 'vhv']
                  

                  But if 'hvh' were to occure for several shapes, It would be extremely hard to look through the output from help() for every possible property. If I was looking for 'shape' itself, I could just run a search on plot.ly/python/reference/ and get:

                  But that is not the case for 'hvh' or hvh:

                  Thank you for any suggestions!

                  解决方案

                  You can always use your in-browser ctl-F to search within the page at https://plot.ly/python/reference/ if the search box isn't giving you what you need.

                  That said, I've just updated our search index to include the list of accepted values in enumerated attributes, so as of 2 minutes ago, searching for "hvh" gives:

                  这篇关于如何搜索绘图图形的特定属性的选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Adding config modes to Plotly.Py offline - modebar(将配置模式添加到 Plotly.Py 离线 - 模式栏)
                  Plotly: How to style a plotly figure so that it doesn#39;t display gaps for missing dates?(Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙?)
                  python save plotly plot to local file and insert into html(python将绘图保存到本地文件并插入到html中)
                  Plotly: What color cycle does plotly express follow?(情节:情节表达遵循什么颜色循环?)
                  How to save plotly express plot into a html or static image file?(如何将情节表达图保存到 html 或静态图像文件中?)
                  Plotly: How to make a line plot from a pandas dataframe with a long or wide format?(Plotly:如何使用长格式或宽格式的 pandas 数据框制作线图?)
                    <legend id='buZA3'><style id='buZA3'><dir id='buZA3'><q id='buZA3'></q></dir></style></legend>
                      <bdo id='buZA3'></bdo><ul id='buZA3'></ul>

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

                          <tbody id='buZA3'></tbody>