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

scatter3d broken in any release after plotly-2.16.5 #6575

Closed
luca-s opened this issue Apr 19, 2023 · 5 comments
Closed

scatter3d broken in any release after plotly-2.16.5 #6575

luca-s opened this issue Apr 19, 2023 · 5 comments

Comments

@luca-s
Copy link

luca-s commented Apr 19, 2023

Just wanted to let you know that any version of plotly after 2.16.5 is not able to plot the most simple scatter3d.

Version 2.16.5:
Screenshot from 2023-04-19 15-40-32

Any other more recent version:
Screenshot from 2023-04-19 15-40-57

var xx = Array.from({length: 500}, () => Math.random()*(6-3)+3);
var yy = Array.from({length: 500}, () => Math.random()*(6-3)+3);
var zz = Array.from({length: 500}, () => Math.random()*(6-3)+3);

	var trace1 = {
//		x:unpack('events', 'x'), y: unpack('events', 'y'), z: unpack('events', 'z'),
    x:xx,y:yy,z:zz,
		type: 'scatter3d',
		mode: 'markers',
		marker: {
			color: 'rgb(17, 157, 255)',
			opacity: 0.5,
			size: 5,
			symbol: 'circle',
			line: {
			color: 'rgba(217, 217, 217, 0.14)',
			width: 0.5},
		}
	}; 

	var trace2 = {
//		x:unpack('stations', 'x'), y: unpack('stations', 'y'), z: unpack('stations', 'z'),
    x:xx,y:yy,z:zz,
		type: 'scatter3d',
		mode: 'markers',
		marker: {
			color: 'rgb(127, 127, 127)',
			opacity: 1.0,
			size: 12,
			symbol: 'circle',
			line: {
			color: 'rgb(204, 204, 204)',
			width: 1},
		}
	};

	var data = [trace1, trace2];

	var layout = {
		showlegend: true,
	};

	var config = {
		responsive: false,
		scrollZoom: true,
		displayModeBar: true
	}

	Plotly.newPlot('myDiv', data, layout, config);
@luca-s
Copy link
Author

luca-s commented Apr 19, 2023

Tested on Firefox and Chrome.

@archmoj
Copy link
Contributor

archmoj commented Apr 19, 2023

Have you tried most recent versions?
e.g. it is working on the latest release.
See: https://codepen.io/MojtabaSamimi/pen/ZEqpqqy?editors=0010

@archmoj
Copy link
Contributor

archmoj commented Apr 19, 2023

This likely the same as #6491.
Please note that you should provide

<meta charset="UTF-8">

in your html head.

@archmoj archmoj closed this as completed Apr 19, 2023
@archmoj archmoj reopened this Apr 19, 2023
@luca-s
Copy link
Author

luca-s commented Apr 19, 2023

I tried all versions above 2.16.5 and it doesn't work in any of them. I tried adding <meta charset="UTF-8">, but it doesn't fix the issue. However I can use version 2.16.5, but I just wanted to let you know the issue. Since it is already mentioned in #6491 I can close this one.

Thanks.

@luca-s luca-s closed this as completed Apr 19, 2023
@luca-s
Copy link
Author

luca-s commented Apr 19, 2023

Actually, I tried again and the <meta charset="UTF-8"> fixes the issue! It looks like the browser cached part of the page and it was still displaying the issue for this reason.

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