I cant figure out the go.Mesh3d() reference

Hello,

I am quite new to programming, so I am sorry in advance if I am asking the wrong questions.
I was exploring the example for 3d meshing which was really helpful and decided to plot some volumes of my own.

I have been going thought the full reference and can’t make showing contour on hover work.

This is what I have tried: https://pastebin.com/NyzTE1qA

My plot works nicely except when i try to test what contour does. Then i get this error:

plotly.exceptions.PlotlyDictValueError: ‘contour’ has invalid value inside ‘mesh3d’

Path To Error: [‘contour’]

Current path: []
Current parent object_names: []

With the current parents, ‘contour’ can be used as follows:

Under (‘figure’, ‘data’, ‘mesh3d’):

editType: calc
role: object

Thank you for your help!

Hi @predo,

Could you update your version of plotly.py (current version is 3.6.1 as of today) and post the new error message?

Thanks!
-Jon

1 Like

Yes it is solved and now the error message helps a lot by asking for a dictionary. Thank you very much for such a swift reply!

I am pasting the error message in case this comes up again for somebody else.

 The 'contour' property is an instance of Contour
    that may be specified as:
      - An instance of plotly.graph_objs.mesh3d.Contour
      - A dict of string/value properties that will be passed
        to the Contour constructor

        Supported dict properties:
            
            color
                Sets the color of the contour lines.
            show
                Sets whether or not dynamic contours are shown
                on hover
            width
                Sets the width of the contour lines.
1 Like