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

Newest version of Plotly is not showing custom contour lines #4175

Closed
ghost opened this issue Sep 9, 2019 · 4 comments · Fixed by #4177
Closed

Newest version of Plotly is not showing custom contour lines #4175

ghost opened this issue Sep 9, 2019 · 4 comments · Fixed by #4177
Assignees
Labels
regression this used to work

Comments

@ghost
Copy link

ghost commented Sep 9, 2019

In the previous version of plotly the values of the contour lines on the plot would correspond to my colorbar levels tickvals, and in the most recent update it now displays them directly from z.

How do I change it so that I can display custom contour lines or have my colorbar tickvals correspond to my contour line values.

@etpinard
Copy link
Contributor

etpinard commented Sep 9, 2019

Hmm, I'm not sure what could have changed the behavior.

Would you mind sharing a reproducible example to help us debug?

@ghost
Copy link
Author

ghost commented Sep 9, 2019

var data = [ {
		  z: [[10, 10.625, 12.5, 15.625, 20],
			  [5.625, 6.25, 8.125, 11.25, 15.625],
			  [2.5, 3.125, 5.0, 8.125, 12.5],
			  [0.625, 1.25, 3.125, 6.25, 10.625],
			  [0, 0.625, 2.5, 5.625, 10]],
		  type: 'contour',
		  contours: {
			coloring: 'heatmap',
			showlabels: true,
			labelfont: {
			  family: 'Raleway',
			  size: 12,
			  color: 'white',
			}
		  }, 
		  colorbar: {
			tickvals: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
			ticktext: [1, 22, 34, 5, 6,77, 88, 99, 10101]
		  },
		}];
		var layout = {
		  title: 'Contour with Labels'
		}
		Plotly.newPlot('myDiv', data, layout);

This example will not display the ticktext as the contour line values with the current version of plotly, but it will on a version that I have dated from back in February 2019.

@ghost
Copy link
Author

ghost commented Sep 9, 2019

test
^Old version of plotly

test
^Newest version of plotly

Same code

@etpinard
Copy link
Contributor

etpinard commented Sep 9, 2019

In codepens,

current: https://codepen.io/etpinard/pen/oNvqgGY
v1.47.4 (last working version): https://codepen.io/etpinard/pen/MWgVYEd

Thanks very much for reporting!

Something must have gone wrong during the shard coloraxis push #3786 / #3803

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression this used to work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant