Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Animations - Only in Offline mode #399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Sep 30, 2021
Merged

Animations - Only in Offline mode #399

merged 14 commits into from
Sep 30, 2021

Conversation

harshpurwar
Copy link
Contributor

This PR adds support for animated lines and comets.

Sample code to try:

t = 0:pi/200:2*pi;
x = cos(3*t);
y = sin(2*t).*cos(3*t);
comet(x,y);
pf = fig2plotly(gcf, 'offline', 1, 'treatAs', 'comet')

Note: This is supported in offline mode.

1
2
3
5

@gilbertogalvis
Copy link
Contributor

Works fine for me!

Copy link
Contributor

@gilbertogalvis gilbertogalvis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work! My only suggestion (coming from @jackparmer) is the request to use camelCase for code development.

@harshpurwar
Copy link
Contributor Author

Added options to specify FrameDuration and FrameTransitionDuration to control the speed of the animations.
Added support for comet3 and 3d animated line.

Copy link
Contributor

@gilbertogalvis gilbertogalvis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When run updated code, it turns out following error

Screen Shot 2021-09-29 at 11 23 31 AM

Reviewing the code I found an error between lines #267 and #268 in plotlyfig.m file (please fix it. It is a missing end command).

Anyway when I fix previous error and run the following code

[xmat,ymat,zmat] = peaks(100); 
xvec = xmat(:);
yvec = ymat(:);
zvec = zmat(:);
comet3(xvec,yvec,zvec)

fig2plotly(gcf, 'offline', true, 'TreatAs', 'comet3');

This takes a long time to run and in at end throws a memory overflow error

@harshpurwar harshpurwar merged commit b75deec into master Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants