band (patch) of varying width?

2 views (last 30 days)
Kate
Kate on 17 Feb 2018
Answered: Image Analyst on 17 Feb 2018
Hi guys, I have an idea for a visualization and I'm wondering if you all think it would be possible with patch or similar. Essentially I'd like to create a patch which operates like a violin plot, where for example greater uncertainty would be a wider section, and less uncertainty would be narrow. I can't use the existing violin on FEX because I would need this band/patch to be (in this example) 72 long.
I've generated some random uncertainty data, but how would I go about setting the width or filling a patch with it? Some sort of moving window-like function? Patches get messy quick. Any brilliant thoughts welcome :)
u=rand(72, 1)
Thanks a bunch.

Answers (1)

Image Analyst
Image Analyst on 17 Feb 2018
It would be possible to create a violin plot but you'd have to come up with the outline yourself, unless there's a built in function for violin that I'm not aware of. Once you have the outlines you can display them with fill() or patch().

Community Treasure Hunt

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

Start Hunting!