Animation of plot elements “falling” down to produce a new plot (distribution/histogram)

조회 수: 3 (최근 30일)
z8080
z8080 2018년 10월 18일
댓글: z8080 2018년 10월 18일
I have line plots showing estimated pitch values of a sound recording across time:
For my presentation, I'd like to suggest how, by simply reversing the x and y axes, these plots can be turned - for analysis purposes - into histograms that show how much time was spent by the sound at each pitch state (across bins of, say, 1-semitone width).
Thus, the above plot would be transformed visually by simply rotating it 90 degrees and letting the (now vertical) lines "fall" down to the x (Pitch) axis, one next to each other. I tried finding some toy example to make it more clear what I want to achieve, alas I could not find anything useful.
I can easily create these histograms, also in Matlab, but what I am unsure how to do is the animation of the vertical bars falling into alignment on the x axis. Ideal would be to find software that generates the intermediate steps for animation by perhaps doing a step-by-step interpolation between the initial plot above, and its reversed (histogram) version in which the bars already "fell"; and then exports either an animated GIF, or intermediate plots that I can then import into my presentation software (Powerpoint) to create the animation myself.
More realistically, I wonder if there is a way to use Matlab itself to create those intermediary steps between two given plots. I am happy to also try out any suggestions in Python, as long as they are provided in sufficient detail (complete beginner there!) Thanks for any help!
I should add my question also holds, more generally, for animating other plot elements too not just lines, e.g. starting from a scatter/dot plot and having the dots fall down into stacks/distributions.
  댓글 수: 2
jonas
jonas 2018년 10월 18일
편집: jonas 2018년 10월 18일
Your description made me think about this animation
Perhaps you can find something useful in the source code ( link ), it seems interpolation was used for moving the pixels.
z8080
z8080 2018년 10월 18일
Haha, that's not too far off indeed, thanks Jonas!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Animation에 대해 자세히 알아보기

제품


릴리스

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by