Generation

generate functionWed, 22 Feb 2023

Change the code below so that the columns have values on the x-axis question6 = 'What is the most preferred working environment for you.' question6 = df[question6].value_counts() label = question6.index counts = question6.values fig = px.bar(x=counts, y=label, orientation='h') fig.update_layout(title_text='Какая рабочая среда для вас наиболее предпочтительна?') fig.show()

from plotly.subplots import make_subplots fig = make_subplots(rows=1, cols=2) fig.add_trace(px.bar(x=label, y=counts, orientation='v'), 1, 1) fig.add_trace(px.bar(x=label, y=counts, orientation='v'), 1, 2) fig.update_layout(title_text='Какая рабочая среда для вас наиболее предпочтительна?', showlegend=False) fig.show()

Questions about programming?Chat with your personal AI assistant