How to plot like this ?

I found an image from statista. I’d like to plot like that in matlab is it possible ?

3 comentarios

Peter O
Peter O el 29 de Sept. de 2020
It's possible, just not easy or practical, and I wouldn't advise trying it. The connected box chart lines is not a standard style in MATLAB, and a quick search suggests it isn't one in most other language's plotting engines either.
Is the image you posted auto-generated from Statista? It looks like they may have started with a bar chart, exported it, and added the text and connecting lines in Adobe Illustrator. That's a workflow you can certainly do with MATLAB (and Adobe). I'd suggest saving the bar chart as SVG, PDF, or EPS to make it easier to work with in the graphics program.
Adam Danz
Adam Danz el 29 de Sept. de 2020
In Matlab, that plot can be reproduced by a bar plot plus 4 patch objects. You'll need to know the properties of bar objects to understand how the bar width and interval can be grabbed. From there, it's just figuring out how to use those values to compute the patch perimeters.
Alternatively, the entire plot could be produced with patch objects alone. I haven't thought about which approach would be easiest.
Jeevan Kumar Bodaballa
Jeevan Kumar Bodaballa el 29 de Sept. de 2020
Thanks for valuable comments 😊

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Etiquetas

Preguntada:

el 28 de Sept. de 2020

Comentada:

el 29 de Sept. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by