0

I'm trying to visualize the mean number of clicks and mean completion time of a given task executed on two different websites. Given the following data:

KUL (Task 1) Gent (Task 1)
Mean Number of clicks 6.75 5.00
Mean Completion time 25.13 20.00

For that, I want a two-y-axis bar chart plot that shows a pair of bars comparing the number of clicks and another pair comparing the completion time. I started trying to do it on Google Sheets and the closest I've gotten was this:

I created the table below and selected the 4 series to plot the bar chart in the image.

KUL (Task 1) clicks KUL (Task 1) time Gent (Task 1) clicks Gent (Task 1) time
Mean Number of clicks 6.75 5.00
Mean Completion time 25.13 20.00

two bar charts concatenated

I know that it's a lot of work for something that could be done in Paint but I'm curious to know if there's a straightforward way to do something like that in Google Sheets.

curioso
  • 125
  • 2
  • 13
  • 1
    Using the first dataframe on the page `df = pd.read_html('https://stackoverflow.com/q/76296929/7758804', index_col=[0])[0]` and `ax = df.plot(kind='bar')` and [How to plot and annotate a grouped bar chart](https://stackoverflow.com/q/63493530/7758804) – Trenton McKinney May 20 '23 at 19:15
  • Thanks, @TrentonMcKinney, how do I add the second axis tho? 'Mean Number of clicks' is not a dataframe key. – curioso May 20 '23 at 19:31
  • 1
    `ax = df.plot(kind='bar', secondary_y='Gent (Task 1)')` as per [Bar-Plot with two bars and two y-axis](https://stackoverflow.com/q/24183101/7758804) – Trenton McKinney May 20 '23 at 19:41
  • Ok, that was simpler than I thought. Thanks for your patience in replying, I look more carefully through SO next time. I've updated the question to make it exclusively about Google Sheets, maybe it's relevant for someone else. – curioso May 20 '23 at 19:55

0 Answers0