Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Orientation not working

Hi, I’m trying to plot a polar graph with a red circle in certain place.

I want the polar graph in a way that 0º defines the North, therefore, orientation is set to -90, but it is not working.

x

This is my configuration:

             var trace1 = {
                    r: [1],
                    theta: [180],
                    mode: 'markers',
                    name: 'example,
                    line: {color: 'red'},
                    type: 'scatterpolar',

                };

            var data = [trace1];

            var layout = {
                title: 'Polar graph',
                font: {
                    family: 'Arial, sans-serif;',
                    size: 12,
                    color: '#000'
                },
                showlegend: true,
                orientation: -90,
            };

            Plotly.newPlot('myDiv', data, layout);

Thanks in advance

orientation is deprecated. Switching to angularaxis.rotation should do the trick -> https://plot.ly/javascript/reference/#layout-polar-angularaxis-rotation

When in doubt, I’d recommend using Plotly.validate(data, layout) to validate your input.