I would like to make a 'bubble' plot, but with rectangular markers. Is it possible to do this in Python?

On x-axis should be the day of the week (Mon, Tue, Wed,...), on y-axis - counts, how many times people came to a restaurant, the area of rectangles - the number of people came to a restaurant. A height of rectangles is always the same, only a width changes.

So, one rectangle on the plot shows how many people how many times came to a restaurant on a particular day of the week. As axis y may have values > 30, bubbles are not suitable and I consider that rectangles works better.

A sketch of what I would like to draw is below.

enter image description here

Is it possible to draw rectangular markers or is there another good way for visualizing the same concept?

UPDATE: I've already tried box and violin plots. The problem with boxplots is that in my case a height of a box is quite small and a tail is long. There are a lot of points indicating outliers. I would prefer to see some difference in outliers instead of a single point. With a bubble plot, it is possible to use some customized function for bubble size, e,g, logarithm.


1 Answer 1


I can imagine a transposed boxplot() working well... in a figure with seven subplots...


enter image description here

  • $\begingroup$ Thank you for the solution, @steadfordium! I still need to polish the plot for good visualization, but it is more about playing with design features (gaps between bars, colors etc) and I am able to do this myself. Have a nice day! $\endgroup$
    – Munira
    Mar 5, 2018 at 10:16
  • $\begingroup$ I can’t seem to see the code from githu, can anyone post it on here? I’m trying to do a similar thing $\endgroup$
    – Hattie
    May 26, 2023 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.