Skip to content

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

@ghost

Description

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.

Activity

etpinard

etpinard commented on Sep 9, 2019

@etpinard
Contributor

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

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

ghost

ghost commented on Sep 9, 2019

@ghost
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

ghost commented on Sep 9, 2019

@ghost

test
^Old version of plotly

test
^Newest version of plotly

Same code

etpinard

etpinard commented on Sep 9, 2019

@etpinard
Contributor

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

self-assigned this
on Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @etpinard

    Issue actions

      Newest version of Plotly is not showing custom contour lines · Issue #4175 · plotly/plotly.js