Skip to content
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

Fixing issue173 #320

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Fixing issue173 #320

wants to merge 5 commits into from

Conversation

benaliabderrahmane
Copy link
Contributor

matlab code:

xt = @(t) sin(t);
yt = @(t) cos(t);
zt = @(t) t;
fplot3(xt,yt,zt)

fig2plotly(gcf, 'offline', false);

#results:
1000

@@ -946,7 +946,7 @@ function delete(obj)
strcmpi(fieldname,'surface') || strcmpi(fieldname,'scatter3d') ...
|| strcmpi(fieldname,'mesh3d') || strcmpi(fieldname,'bar') ...
|| strcmpi(fieldname,'scatterpolar') || strcmpi(fieldname,'barpolar') ...
)
|| strcmpi(fieldname,'scene'))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the struct scene should be added in the file plotly_reference.mat or alternatively this line of code

@benaliabderrahmane benaliabderrahmane linked an issue Aug 6, 2021 that may be closed by this pull request
@VolKa79
Copy link

VolKa79 commented Aug 7, 2021

I am not sure that in plotly/plotlyfig_aux/core/updateData.m its necessary to define next:

obj.layout.scene.camera.eye.x = -1.25;
obj.layout.scene.camera.eye.y = -1.25;
obj.layout.scene.camera.eye.z = 0.75;
obj.layout.scene.camera.center.z = -0.5;

code works good with and without this

@xarico10
Copy link
Contributor

xarico10 commented Aug 8, 2021

Please remember to reference the issue not only on the title, but its link in the comments as well. Like this #173

Copy link
Contributor

@xarico10 xarico10 left a comment

Choose a reason for hiding this comment

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

Default axes limits not matching. MATLAB plots form -5 to 5. Plotly plots from -4 to 2 in the z-axis:
Captura de Pantalla 2021-08-07 a la(s) 9 33 16 p  m
Captura de Pantalla 2021-08-07 a la(s) 9 33 25 p  m

@xarico10
Copy link
Contributor

xarico10 commented Aug 8, 2021

Also, I'm getting the following warning message:

Whoops! Unrecognized field name "camera" in scene

@jackparmer
Copy link
Contributor

Also, I'm getting the following warning message: Whoops! Unrecognized field name "camera" in scene

@xarico10 This is only because plotly_reference.mat is outdated as @harshpurwar mentioned here:

#325 (comment)

And discussed in Slack:

https://plotly.slack.com/archives/C029RHELF3J/p1628359451212400

https://plotly.slack.com/archives/C029RHELF3J/p1628456355237800

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.

Plotting 3-D functions using fplot3() not supported
4 participants