Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d24fcef

Browse files
committed
Recopy fig data without modifying anything (i.e. PEP 8, removing extra blank spaces)
1 parent 577a900 commit d24fcef

File tree

1 file changed

+166
-4
lines changed

1 file changed

+166
-4
lines changed

plotly/tests/test_optional/test_figure_factory.py

Lines changed: 166 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,165 @@ def test_trisurf_all_args(self):
646646
height=500, width=500,
647647
aspectratio=dict(x=0.7, y=0.6, z=1.2)
648648
)
649-
649+
exp_trisurf_plot = {'data': [{'facecolor': ['rgb(127.5, 127.5, 127.5)',
650+
'rgb(255.0, 255.0, 255.0)',
651+
'rgb(127.5, 127.5, 127.5)',
652+
'rgb(0.0, 0.0, 0.0)',
653+
'rgb(127.5, 127.5, 127.5)',
654+
'rgb(0.0, 0.0, 0.0)',
655+
'rgb(127.5, 127.5, 127.5)',
656+
'rgb(255.0, 255.0, 255.0)'],
657+
'i': [3, 1, 1, 5, 7, 3, 5, 7],
658+
'j': [1, 3, 5, 1, 3, 7, 7, 5],
659+
'k': [4, 0, 4, 2, 4, 6, 4, 8],
660+
'name': '',
661+
'type': 'mesh3d',
662+
'x': array([-1., 0., 1., -1., 0., 1., -1., 0., 1.]),
663+
'y': array([-0.54030231, 0. , 0.54030231, -1. , 0. ,
664+
1. , -0.54030231, 0. , 0.54030231]),
665+
'z': array([ 0.84147098, -0. , -0.84147098, -0. , 0. ,
666+
0. , -0.84147098, 0. , 0.84147098])},
667+
{'line': {'color': 'rgb(50, 50, 50)', 'width': 1.5},
668+
'mode': 'lines',
669+
'type': 'scatter3d',
670+
'x': [-1.0,
671+
0.0,
672+
0.0,
673+
-1.0,
674+
None,
675+
0.0,
676+
-1.0,
677+
-1.0,
678+
0.0,
679+
None,
680+
0.0,
681+
1.0,
682+
0.0,
683+
0.0,
684+
None,
685+
1.0,
686+
0.0,
687+
1.0,
688+
1.0,
689+
None,
690+
0.0,
691+
-1.0,
692+
0.0,
693+
0.0,
694+
None,
695+
-1.0,
696+
0.0,
697+
-1.0,
698+
-1.0,
699+
None,
700+
1.0,
701+
0.0,
702+
0.0,
703+
1.0,
704+
None,
705+
0.0,
706+
1.0,
707+
1.0,
708+
0.0,
709+
None],
710+
'y': [-1.0,
711+
0.0,
712+
0.0,
713+
-1.0,
714+
None,
715+
0.0,
716+
-1.0,
717+
-0.54030230586813977,
718+
0.0,
719+
None,
720+
0.0,
721+
1.0,
722+
0.0,
723+
0.0,
724+
None,
725+
1.0,
726+
0.0,
727+
0.54030230586813977,
728+
1.0,
729+
None,
730+
0.0,
731+
-1.0,
732+
0.0,
733+
0.0,
734+
None,
735+
-1.0,
736+
0.0,
737+
-0.54030230586813977,
738+
-1.0,
739+
None,
740+
1.0,
741+
0.0,
742+
0.0,
743+
1.0,
744+
None,
745+
0.0,
746+
1.0,
747+
0.54030230586813977,
748+
0.0,
749+
None],
750+
'z': [-0.0,
751+
-0.0,
752+
0.0,
753+
-0.0,
754+
None,
755+
-0.0,
756+
-0.0,
757+
0.8414709848078965,
758+
-0.0,
759+
None,
760+
-0.0,
761+
0.0,
762+
0.0,
763+
-0.0,
764+
None,
765+
0.0,
766+
-0.0,
767+
-0.8414709848078965,
768+
0.0,
769+
None,
770+
0.0,
771+
-0.0,
772+
0.0,
773+
0.0,
774+
None,
775+
-0.0,
776+
0.0,
777+
-0.8414709848078965,
778+
-0.0,
779+
None,
780+
0.0,
781+
0.0,
782+
0.0,
783+
0.0,
784+
None,
785+
0.0,
786+
0.0,
787+
0.8414709848078965,
788+
0.0,
789+
None]}],
790+
'layout': {'height': 500,
791+
'scene': {'aspectratio': {'x': 0.7, 'y': 0.6, 'z': 1.2},
792+
'xaxis': {'backgroundcolor': 'rgb(1, 1, 1)',
793+
'gridcolor': 'rgb(2, 2, 2)',
794+
'showbackground': False,
795+
'zerolinecolor': 'rgb(3, 3, 3)'},
796+
'yaxis': {'backgroundcolor': 'rgb(1, 1, 1)',
797+
'gridcolor': 'rgb(2, 2, 2)',
798+
'showbackground': False,
799+
'zerolinecolor': 'rgb(3, 3, 3)'},
800+
'zaxis': {'backgroundcolor': 'rgb(1, 1, 1)',
801+
'gridcolor': 'rgb(2, 2, 2)',
802+
'showbackground': False,
803+
'zerolinecolor': 'rgb(3, 3, 3)'}},
804+
'title': 'Fun',
805+
'width': 500}}
806+
807+
"""
650808
exp_trisurf_plot = {
651809
'data': [{'facecolor': ['rgb(112.5, 115.00000000000001, 196.0)',
652810
'rgb(220.0, 220.0, 220.0)',
@@ -828,11 +986,15 @@ def test_trisurf_all_args(self):
828986
'title': 'Fun',
829987
'width': 500}}
830988
989+
"""
990+
991+
#self.assertEqual(test_trisurf_plot['data'], exp_trisurf_plot['data'])
992+
993+
#self.assert_dict_equal(test_trisurf_plot['data'][0],
994+
# exp_trisurf_plot['data'][0])
995+
831996
self.assert_dict_equal(test_trisurf_plot['data'][0],
832997
exp_trisurf_plot['data'][0])
833998

834-
#self.assert_dict_equal(test_trisurf_plot['data'][1],
835-
# exp_trisurf_plot['data'][1])
836-
837999
self.assert_dict_equal(test_trisurf_plot['layout'],
8381000
exp_trisurf_plot['layout'])

0 commit comments

Comments
 (0)