def setUp(self):
        _future_flags.add('v4_subplots')

        fig = make_subplots(
            rows=3,
            cols=3,
            specs=[[{}, {'type': 'scene'}, {}],
                   [{'secondary_y': True},
                    {'type': 'polar'},
                    {'type': 'polar'}],
                   [{'type': 'xy', 'colspan': 2}, None, {'type': 'ternary'}]]
        ).update(layout={'height': 800})

        fig.layout.xaxis.title.text = 'A'
        fig.layout.xaxis2.title.text = 'A'
        fig.layout.xaxis3.title.text = 'B'
        fig.layout.xaxis4.title.text = 'B'

        fig.layout.yaxis.title.text = 'A'
        fig.layout.yaxis2.title.text = 'B'
        fig.layout.yaxis3.title.text = 'A'
        fig.layout.yaxis4.title.text = 'B'

        fig.layout.polar.angularaxis.rotation = 45
        fig.layout.polar2.angularaxis.rotation = 45
        fig.layout.polar.radialaxis.title.text = 'A'
        fig.layout.polar2.radialaxis.title.text = 'B'

        fig.layout.scene.xaxis.title.text = 'A'
        fig.layout.scene.yaxis.title.text = 'B'

        fig.layout.ternary.aaxis.title.text = 'A'

        self.fig = fig
        self.fig_no_grid = go.Figure(self.fig.to_dict())
Exemple #2
0
    def setUp(self):
        _future_flags.add('v4_subplots')

        fig = make_subplots(rows=3,
                            cols=3,
                            specs=[[{}, {
                                'type': 'scene'
                            }, {}],
                                   [{
                                       'secondary_y': True
                                   }, {
                                       'type': 'polar'
                                   }, {
                                       'type': 'polar'
                                   }],
                                   [{
                                       'type': 'xy',
                                       'colspan': 2
                                   }, None, {
                                       'type': 'ternary'
                                   }]]).update(layout={'height': 800})

        fig.layout.xaxis.title.text = 'A'
        fig.layout.xaxis2.title.text = 'A'
        fig.layout.xaxis3.title.text = 'B'
        fig.layout.xaxis4.title.text = 'B'

        fig.layout.yaxis.title.text = 'A'
        fig.layout.yaxis2.title.text = 'B'
        fig.layout.yaxis3.title.text = 'A'
        fig.layout.yaxis4.title.text = 'B'

        fig.layout.polar.angularaxis.rotation = 45
        fig.layout.polar2.angularaxis.rotation = 45
        fig.layout.polar.radialaxis.title.text = 'A'
        fig.layout.polar2.radialaxis.title.text = 'B'

        fig.layout.scene.xaxis.title.text = 'A'
        fig.layout.scene.yaxis.title.text = 'B'

        fig.layout.ternary.aaxis.title.text = 'A'

        self.fig = fig
        self.fig_no_grid = go.Figure(self.fig.to_dict())
from __future__ import absolute_import
from _plotly_future_ import _future_flags, _assert_plotly_not_imported

_assert_plotly_not_imported()
_future_flags.add('remove_deprecations')
    def setUp(self):
        _future_flags.add('v4_subplots')
        fig = make_subplots(
            rows=3,
            cols=2,
            specs=[[{}, {'type': 'scene'}],
                   [{'secondary_y': True}, {'type': 'polar'}],
                   [{'type': 'domain', 'colspan': 2}, None]]
        ).update(layout={'height': 800})

        # data[0], (1, 1)
        fig.add_scatter(
            mode='markers',
            y=[2, 3, 1],
            name='A',
            marker={'color': 'green', 'size': 10},
            row=1, col=1)

        # data[1], (1, 1)
        fig.add_bar(y=[2, 3, 1], row=1, col=1, name='B')

        # data[2], (2, 1)
        fig.add_scatter(
            mode='lines',
            y=[1, 2, 0],
            line={'color': 'purple'},
            name='C',
            row=2,
            col=1,
        )

        # data[3], (2, 1)
        fig.add_heatmap(
            z=[[2, 3, 1], [2, 1, 3], [3, 2, 1]],
            row=2,
            col=1,
            name='D',
        )

        # data[4], (1, 2)
        fig.add_scatter3d(
            x=[0, 0, 0],
            y=[0, 0, 0],
            z=[0, 1, 2],
            mode='markers',
            marker={'color': 'green', 'size': 10},
            name='E',
            row=1,
            col=2
        )

        # data[5], (1, 2)
        fig.add_scatter3d(
            x=[0, 0, -1],
            y=[-1, 0, 0],
            z=[0, 1, 2],
            mode='lines',
            line={'color': 'purple', 'width': 4},
            name='F',
            row=1,
            col=2
        )

        # data[6], (2, 2)
        fig.add_scatterpolar(
            mode='markers',
            r=[0, 3, 2],
            theta=[0, 20, 87],
            marker={'color': 'green', 'size': 8},
            name='G',
            row=2,
            col=2
        )

        # data[7], (2, 2)
        fig.add_scatterpolar(
            mode='lines',
            r=[0, 3, 2],
            theta=[20, 87, 111],
            name='H',
            row=2,
            col=2
        )

        # data[8], (3, 1)
        fig.add_parcoords(
            dimensions=[{'values': [1, 2, 3, 2, 1]},
                        {'values': [3, 2, 1, 3, 2, 1]}],
            line={'color': 'purple'},
            name='I',
            row=3,
            col=1
        )

        # data[9], (2, 1) with secondary_y
        fig.add_scatter(
            mode='lines',
            y=[1, 2, 0],
            line={'color': 'purple'},
            name='C',
            row=2,
            col=1,
            secondary_y=True
        )

        self.fig = fig
        self.fig_no_grid = go.Figure(self.fig.to_dict())
    def setUp(self):
        _future_flags.add('v4_subplots')
        fig = make_subplots(rows=3,
                            cols=2,
                            specs=[[{}, {
                                'type': 'scene'
                            }], [{}, {
                                'type': 'polar'
                            }], [{
                                'type': 'domain',
                                'colspan': 2
                            }, None]]).update(layout={'height': 800})

        # data[0], (1, 1)
        fig.add_scatter(mode='markers',
                        y=[2, 3, 1],
                        name='A',
                        marker={
                            'color': 'green',
                            'size': 10
                        },
                        row=1,
                        col=1)

        # data[1], (1, 1)
        fig.add_bar(y=[2, 3, 1], row=1, col=1, name='B')

        # data[2], (2, 1)
        fig.add_scatter(
            mode='lines',
            y=[1, 2, 0],
            line={'color': 'purple'},
            name='C',
            row=2,
            col=1,
        )

        # data[3], (2, 1)
        fig.add_heatmap(
            z=[[2, 3, 1], [2, 1, 3], [3, 2, 1]],
            row=2,
            col=1,
            name='D',
        )

        # data[4], (1, 2)
        fig.add_scatter3d(x=[0, 0, 0],
                          y=[0, 0, 0],
                          z=[0, 1, 2],
                          mode='markers',
                          marker={
                              'color': 'green',
                              'size': 10
                          },
                          name='E',
                          row=1,
                          col=2)

        # data[5], (1, 2)
        fig.add_scatter3d(x=[0, 0, -1],
                          y=[-1, 0, 0],
                          z=[0, 1, 2],
                          mode='lines',
                          line={
                              'color': 'purple',
                              'width': 4
                          },
                          name='F',
                          row=1,
                          col=2)

        # data[6], (2, 2)
        fig.add_scatterpolar(mode='markers',
                             r=[0, 3, 2],
                             theta=[0, 20, 87],
                             marker={
                                 'color': 'green',
                                 'size': 8
                             },
                             name='G',
                             row=2,
                             col=2)

        # data[7], (2, 2)
        fig.add_scatterpolar(mode='lines',
                             r=[0, 3, 2],
                             theta=[20, 87, 111],
                             name='H',
                             row=2,
                             col=2)

        # data[8], (3, 1)
        fig.add_parcoords(dimensions=[{
            'values': [1, 2, 3, 2, 1]
        }, {
            'values': [3, 2, 1, 3, 2, 1]
        }],
                          line={'color': 'purple'},
                          name='I',
                          row=3,
                          col=1)

        self.fig = fig
        self.fig_no_grid = go.Figure(self.fig.to_dict())
Exemple #6
0
 def setUp(self):
     # Use v4_subplots mode
     _future_flags.add('v4_subplots')
Exemple #7
0
from __future__ import absolute_import
from _plotly_future_ import _future_flags, _assert_plotly_not_imported

_assert_plotly_not_imported()
_future_flags.add('template_defaults')
from __future__ import absolute_import
from _plotly_future_ import _future_flags, _assert_plotly_not_imported

_assert_plotly_not_imported()
_future_flags.add('orca_defaults')
from __future__ import absolute_import
from _plotly_future_ import _future_flags, _assert_plotly_not_imported

_assert_plotly_not_imported()
_future_flags.add('trace_uids')
from __future__ import absolute_import
from _plotly_future_ import _future_flags, _assert_plotly_not_imported

_assert_plotly_not_imported()
_future_flags.add('extract_chart_studio')
from __future__ import absolute_import
from _plotly_future_ import _future_flags, _assert_plotly_not_imported

_assert_plotly_not_imported()
_future_flags.add('renderer_defaults')
Exemple #12
0
from __future__ import absolute_import
from _plotly_future_ import _future_flags, _assert_plotly_not_imported

_assert_plotly_not_imported()
_future_flags.add('v4_subplots')
Exemple #13
0
from __future__ import absolute_import
from _plotly_future_ import _future_flags, _assert_plotly_not_imported

_assert_plotly_not_imported()
_future_flags.add('timezones')