Filter löschen
Filter löschen

Smooth Animated Transition Between Linear and Log Scale

7 Ansichten (letzte 30 Tage)
Oliver
Oliver am 6 Aug. 2014
Bearbeitet: dpb am 6 Aug. 2014
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 Kommentare
dpb
dpb am 6 Aug. 2014
Bearbeitet: dpb am 6 Aug. 2014
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".

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Animation finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by