Can MATLAB plot a graph like this? (Ignore the black lines and light blue areas; I only care about the red and blue points.)

24 views (last 30 days)
Hello everyone, I want to plot the image below. Please ignore the other parts; I'm mainly focused on the red and blue points. I know the scatter function can plot points of different sizes, but the issue is with the red legend next to it. Can MATLAB generate a legend like this, reflecting the size of the points? Looking forward to any responses.

Answers (2)

Cris LaPierre
Cris LaPierre about 16 hours ago
This is a bubble chart. You can create this in MATLAB using bubblechart
The legend isn't exactly the same, but conveys the relationship between size and value.
  1 Comment
ma Jack
ma Jack about 7 hours ago
It seems that the bubblechart legend can have at most three bubbles. Is it possible to change this? I'd like to create a legend like the red one in the image above, made up of many continuously varying sized points.

Sign in to comment.


Image Analyst
Image Analyst about 7 hours ago
Instead of bubble chart, try scatter where you can specify the color and size of each marker.

Products


Release

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!