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

method argument not working on slice() #313

Open
xarico10 opened this issue Aug 5, 2021 · 0 comments
Open

method argument not working on slice() #313

xarico10 opened this issue Aug 5, 2021 · 0 comments
Assignees

Comments

@xarico10
Copy link
Contributor

xarico10 commented Aug 5, 2021

When specifying the interpolation method using the method input argument, where method can be 'linear' (the default), 'cubic', or 'nearest', such interpolation method isn't being applied.

[X,Y,Z] = meshgrid(-2:2);
V = X.*exp(-X.^2-Y.^2-Z.^2);
xslice = 0.8;   
yslice = [];
zslice = [];
slice(X,Y,Z,V,xslice,yslice,zslice,'nearest')


fig2plotly(gcf, 'offline', false);

Expected and generated (https://chart-studio.plotly.com/~xarico10/1043/#/) plots:
Captura de Pantalla 2021-08-05 a la(s) 4 31 33 p  m
Captura de Pantalla 2021-08-05 a la(s) 4 31 53 p  m

Also, as seen, the expected plot is a 4x4 surface. That grid division isn't happening in Plotly.

Examples on using method can be found on:
https://www.mathworks.com/help/matlab/ref/slice.html#mw_e6993c56-f881-47e4-a291-fff253172919

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

No branches or pull requests

3 participants