필터 지우기
필터 지우기

Smooth Animated Transition Between Linear and Log Scale

조회 수: 7 (최근 30일)
Oliver
Oliver 2014년 8월 6일
편집: dpb 2014년 8월 6일
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
dpb
dpb 2014년 8월 6일
편집: dpb 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개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by