plotly / plotly/plotly_matlab

method argument not working on slice()

Open
#313 0 comments 0 reactions 1 assignee View on GitHub

@gilbertogalvis is already working on this.

Since Oct 16, 2021.

Dominant language
MATLAB
Stars
413
Forks
166
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.