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

clims argument not working on imagesc() #285

Closed
xarico10 opened this issue Aug 3, 2021 · 1 comment
Closed

clims argument not working on imagesc() #285

xarico10 opened this issue Aug 3, 2021 · 1 comment
Assignees

Comments

@xarico10
Copy link
Contributor

xarico10 commented Aug 3, 2021

Specifying the data values that map to the first and last elements of the colormap using clims isn't working.

C = [0 2 4 6; 8 10 12 14; 16 18 20 22];
clims = [4 18];
imagesc(C,clims)

fig2plotly(gcf, 'offline', false);

The previous code prints the following warning message:

Unrecognized field name "DisplayName".
We had trouble parsing the image object.
This trace might not render properly.

Expected and generated (https://chart-studio.plotly.com/~xarico10/912/#/) plots:
Captura de Pantalla 2021-08-03 a la(s) 5 06 18 p  m
Note that clims is creating an image of C and setting the color limits so that values of 4 or less map to the first color in the colormap and values of 18 or more map to the last color in the colormap.
Captura de Pantalla 2021-08-03 a la(s) 5 05 44 p  m

Examples on using clims can be found on:
https://www.mathworks.com/help/matlab/ref/imagesc.html#bux1nvc-1

@xarico10 xarico10 changed the title clims argument not working on images() clims argument not working on imagesc() Aug 3, 2021
@harshpurwar harshpurwar self-assigned this Aug 7, 2021
@harshpurwar
Copy link
Contributor

image

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