Smooth Animated Transition Between Linear and Log Scale
이전 댓글 표시
I would like to animate a plot as it smoothly transitions from a linear scale to a log scale. I have tried changing the axis tick positions and the axis limits, but this still doesn't have the right effect. It seems you can tell matlab to put a tick at y = 10, but you can't tell matlab where y = 10 should be. To be honest that's probably not the best way of doing it, but it explains what I think is the problem. Here is an illustration of what I'm trying to do (I didn't write it) EXAMPLE, just press CTRL+Enter to run the jsfiddle script, the animated plot will be in the lower right hand window.
How can you do this in matlab?
댓글 수: 2
Oliver
2014년 8월 6일
I don't know enough Java to bother to try to read somebody else's code, but...
...It seems you can tell matlab to put a tick at y = 10, but you can't tell matlab where y = 10 should be...
The value 10 will be wherever 10 is relative to ylim -- it'll physically be located at the fractional distance [10-ylim(1)]/[ylim(2)-ylim(1)].
The axis units will be in either linear or logarithmic units; to mung on them somewhere in between would require changing the data coordinates in some transformational fashion to skew them between the two scalings. Same thing for the axes tick values, of course, to keep them in synch. If do that the ticks will move automagically.
PS. I ran the demo--didn't see it do anything except switch from linear to log after a short delay...I saw no "animated transition".
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!