Effacer les filtres
Effacer les filtres

Smooth Animated Transition Between Linear and Log Scale

7 vues (au cours des 30 derniers jours)
Oliver
Oliver le 6 Août 2014
Modifié(e) : dpb le 6 Août 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 commentaires
Oliver
Oliver le 6 Août 2014
How to do this in matlab?
dpb
dpb le 6 Août 2014
Modifié(e) : dpb le 6 Août 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".

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Animation dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by