Skip to content

docs - contour plot warning and wrong color #439

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

Closed
danton267 opened this issue Oct 23, 2021 · 1 comment
Closed

docs - contour plot warning and wrong color #439

danton267 opened this issue Oct 23, 2021 · 1 comment

Comments

@danton267
Copy link
Member

x = -2:0.2:2;
y = -2:0.2:3;
[X,Y] = meshgrid(x,y);
Z = X.*exp(-X.^2-Y.^2);
contour(X,Y,Z,'ShowText','on')

fig2plotly(gcf);

Results in this warning

Whoops! Unrecognized field name "showlabels" in contours

Same error:

[X,Y,Z] = peaks(50);
contourf(X,Y,Z,[2 3],'ShowText','on')

fig2plotly(gcf);

but this plot, the background is supposed to be gray, it is blue.

Similarly, wrong background:

[X,Y,Z] = peaks;
contourf(X,Y,Z,[2 2])

fig2plotly(gcf);
@danton267 danton267 changed the title docs - contour plot warning docs - contour plot warning and wrong color Oct 23, 2021
gilbertogalvis pushed a commit that referenced this issue Oct 30, 2021
@gilbertogalvis
Copy link
Contributor

This was fixed by PR #467

Example 1

x = -2:0.2:2;
y = -2:0.2:3;
[X,Y] = meshgrid(x,y);
Z = X.*exp(-X.^2-Y.^2);
contour(X,Y,Z,'ShowText','on')

fig2plotly(gcf);

Screen Shot 2021-10-30 at 12 56 32 PM

Example 2

[X,Y,Z] = peaks(50);
contourf(X,Y,Z,[2 3],'ShowText','on')

fig2plotly(gcf);

Screen Shot 2021-10-30 at 12 56 50 PM

Example 3

[X,Y,Z] = peaks;
contourf(X,Y,Z,[2 2])

fig2plotly(gcf);

Screen Shot 2021-10-30 at 12 57 17 PM

PLUS

[X,Y,Z] = peaks(50);
contourf(X,Y,Z,[-4:0.5:4],'ShowText','on')

fig2plotly(gcf);

Screen Shot 2021-10-30 at 12 57 58 PM

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

2 participants