Generation

generate functionWed, 22 Feb 2023

Modify this code to make a vertical bar graph instead of a pie chart (plotly.express library) question6 = "How likely would you work for a company whose mission is not bringing social impact ?" question6 = data[question6].value_counts() label = question6.index counts = question6.values colors = ['gold','lightgreen'] fig = go.Figure(data=[go.Pie(labels=label, values=counts)]) fig.update_layout(title_text='How likely would you work for a company whose mission is not bringing social impact?') fig.update_traces(hoverinfo='label+value', textinfo='percent', textfont_size=30, marker=dict(colors=colors, line=dict(color='black', width=3))) fig.show()

function that: Modify this code to make a vertical bar graph instead of a pie chart (plotly.express library) question6 = "How likely would you work for a company whose mission is not bringing social impact ?" question6 = data[question6].value_counts() label = question6.index counts = question6.values colors = ['gold','lightgreen'] fig = go.Figure(data=[go.Pie(labels=label, values=counts)]) fig.update_layout(title_text='How likely would you work for a company whose mission is not bringing social impact?') fig.update_traces(hoverinfo='label+value', textinfo='percent', textfont_size=30, marker=dict(colors=colors, line=dict(color='black', width=3))) fig.show()

Questions about programming?Chat with your personal AI assistant