Beispiel #1
0
 def test_au_n_enc_full(self):
     g = graphistry.bind(node='n',
                         point_color='c',
                         point_size='s',
                         point_title='t',
                         point_label='l',
                         point_weight='w',
                         point_opacity='o',
                         point_icon='i',
                         point_x='x',
                         point_y='y')
     au = ArrowUploader()
     assert au.g_to_node_encodings(g) == \
         {
             'node': 'n',
             'node_color': 'c',
             'node_size': 's',
             'node_title': 't',
             'node_label': 'l',
             'node_weight': 'w',
             'node_opacity': 'o',
             'node_icon': 'i',
             'node_x': 'x',
             'node_y': 'y',
         }
 def test_au_n_enc_full(self):        
     g = graphistry.bind(node='n',
         point_color='c', point_size='s', point_title='t', point_label='l',
         point_weight='w', point_opacity='o', point_icon='i', point_x='x', point_y='y')
     g = g.encode_point_color('c', ["green"], as_categorical=True)
     au = ArrowUploader()
     assert au.g_to_node_encodings(g) == {
         'bindings': {
             'node': 'n',
             'node_color': 'c',
             'node_size': 's',
             'node_title': 't',
             'node_label': 'l',
             'node_weight': 'w',
             'node_opacity': 'o',
             'node_icon': 'i',
             'node_x': 'x',
             'node_y': 'y',
         },
         'complex': {
             'default': {
                 'pointColorEncoding': {
                     'graphType': 'point',
                     'encodingType': 'color',
                     'attribute': 'c',
                     'variation': 'categorical',
                     'colors': ['green']
                 }
             }
         }
     }
Beispiel #3
0
 def test_au_n_enc_mt(self):
     g = graphistry.bind()
     au = ArrowUploader()
     assert au.g_to_node_encodings(g) == {'bindings': {}}