Black Lives Matter. Please consider donating to Black Girls Code today.

The HELP order error

How use help orb?

i use Bar.help(‘text’),Bar[‘text’].help(),Bar.text.help()
but is error

Valid attributes for ‘bar’ at path [] under parents ():

    ['bardir', 'base', 'basesrc', 'constraintext', 'customdata',
    'customdatasrc', 'dx', 'dy', 'error_x', 'error_y', 'hoverinfo',
    'hoverinfosrc', 'hoverlabel', 'hovertext', 'hovertextsrc', 'ids',
    'idssrc', 'insidetextfont', 'legendgroup', 'marker', 'name', 'offset',
    'offsetsrc', 'opacity', 'orientation', 'outsidetextfont', 'r', 'rsrc',
    'showlegend', 'stream', 't', 'text', 'textfont', 'textposition',
    'textpositionsrc', 'textsrc', 'tsrc', 'type', 'uid', 'visible',
    'width', 'widthsrc', 'x', 'x0', 'xaxis', 'xcalendar', 'xsrc', 'y',
    'y0', 'yaxis', 'ycalendar', 'ysrc']

Run `<bar-object>.help('attribute')` on any of the above.
'<bar-object>' is the object at []

i not sure know what mean…
Can anyone tell me the correct grammar, please?

@chriddyp ples,i am a Loyal fans

maybe have somebody here?

I’m not quite sure what the question you’re asking is. If you’re wondering how to use the Bar graph_object, my understanding is that it’s just a convenience wrapper around a dictionary that understands the available attributes that are valid for a bar chart trace. You don’t actually need to use it, you could just use a dictionary with the keys you want yourself.

For example, I think these do the same things:

figure1 = {'data':[Bar(x=x_data, y=y_data)]}
figure2 = {'data':[{'x': x_data, 'y': y_data}]}

Hopefully someone will correct me if I’m wrong about any of that.

Thanks for the reply My English is not good, please forgive me. I mean, I want to know what parameters Bar.text can support? Can you use the help command to get it?

All good :slight_smile:

The reference page that lists all the params is this one https://plot.ly/python/reference/#bar

1 Like

YES! this is i want need!!! but how can use the HELP order see? bec some time always check WEB not good

The help() builtin is limited to displaying whatever documentation has been provided by the author of the module. You’ve already seen the documentation that is present when you do help(plotly.graph_objs.Bar), so it seems that you’re limited to using the online documentation. Maybe you could save the page for offline browsing if internet connectivity is an issue?

Thank you so much sir.

1 Like