Skip to content
Advertisement

How can I search for the options for a particular property of a plotly figure?

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:

enter image description here

Code:

JavaScript

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:

JavaScript

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'])

JavaScript

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:

enter image description here

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

enter image description here

Thank you for any suggestions!

Advertisement

Answer

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:

enter image description here

Advertisement