@@ -110,9 +110,10 @@ class Figure(PlotDataObject):
110110
111111 _standalone_in_db = True
112112
113- def __init__ (self , type_ : str , width : int = 750 , height : int = 400 , name : str = '' , ** kwargs ):
113+ def __init__ (self , type_ : str , width : int = 750 , height : int = 400 , axis_on : bool = True , name : str = '' , ** kwargs ):
114114 self .width = width
115115 self .height = height
116+ self .axis_on = axis_on
116117 PlotDataObject .__init__ (self , type_ = type_ , name = name , ** kwargs )
117118
118119 @property
@@ -879,7 +880,7 @@ class Graph2D(Figure):
879880
880881 def __init__ (self , graphs : List [Dataset ], x_variable : str , y_variable : str , axis : Axis = None ,
881882 log_scale_x : bool = None , log_scale_y : bool = None , width : int = 750 , height : int = 400 ,
882- name : str = '' ):
883+ axis_on : bool = True , name : str = '' ):
883884 self .graphs = graphs
884885 self .attribute_names = [x_variable , y_variable ]
885886 if axis is None :
@@ -888,7 +889,7 @@ def __init__(self, graphs: List[Dataset], x_variable: str, y_variable: str, axis
888889 self .axis = axis
889890 self .log_scale_x = log_scale_x
890891 self .log_scale_y = log_scale_y
891- super ().__init__ (width = width , height = height , type_ = 'graph2d' , name = name )
892+ super ().__init__ (width = width , height = height , type_ = 'graph2d' , axis_on = axis_on , name = name )
892893
893894 def mpl_plot (self , ax = None , ** kwargs ):
894895 """ Plots using matplotlib. """
@@ -1055,7 +1056,7 @@ class Scatter(Figure):
10551056 def __init__ (self , x_variable : str = None , y_variable : str = None , tooltip : Tooltip = None ,
10561057 point_style : PointStyle = None , elements : List [Sample ] = None , points_sets : List [PointFamily ] = None ,
10571058 axis : Axis = None , log_scale_x : bool = None , log_scale_y : bool = None , heatmap : Heatmap = None ,
1058- heatmap_view : bool = None , width : int = 750 , height : int = 400 , name : str = '' ):
1059+ heatmap_view : bool = None , width : int = 750 , height : int = 400 , axis_on : bool = True , name : str = '' ):
10591060 self .tooltip = tooltip
10601061 self .attribute_names = [x_variable , y_variable ]
10611062 self .point_style = point_style
@@ -1082,7 +1083,7 @@ def __init__(self, x_variable: str = None, y_variable: str = None, tooltip: Tool
10821083 self .heatmap = heatmap
10831084 self .heatmap_view = heatmap_view
10841085 self .points_sets = points_sets
1085- super ().__init__ (width = width , height = height , type_ = 'scatterplot' , name = name )
1086+ super ().__init__ (width = width , height = height , type_ = 'scatterplot' , axis_on = axis_on , name = name )
10861087
10871088
10881089class ScatterMatrix (Figure ):
@@ -1092,7 +1093,8 @@ class ScatterMatrix(Figure):
10921093 _plot_buttons = "MULTIPLOT_BUTTONS"
10931094
10941095 def __init__ (self , elements : List [Sample ] = None , axes : List [str ] = None , point_style : PointStyle = None ,
1095- surface_style : SurfaceStyle = None , width : int = 750 , height : int = 400 , name : str = "" ):
1096+ surface_style : SurfaceStyle = None , width : int = 750 , height : int = 400 , axis_on : bool = True ,
1097+ name : str = "" ):
10961098 if elements is None :
10971099 elements = []
10981100 sampled_elements = []
@@ -1112,7 +1114,7 @@ def __init__(self, elements: List[Sample] = None, axes: List[str] = None, point_
11121114 self .surface_style = surface_style
11131115 self .plots = self ._build_multiplot ()
11141116 self .initial_view_on = True
1115- super ().__init__ (width = width , height = height , type_ = "multiplot" , name = name )
1117+ super ().__init__ (width = width , height = height , type_ = "multiplot" , axis_on = axis_on , name = name )
11161118
11171119 def _build_multiplot (self ):
11181120 sample_attributes = self .elements [0 ].values .keys ()
@@ -1299,10 +1301,10 @@ class PrimitiveGroup(Figure):
12991301
13001302 def __init__ (self , primitives : List [Union [Contour2D , Arc2D , LineSegment2D , Circle2D ,
13011303 Line2D , MultipleLabels , Wire , Point2D ]], width : int = 750 ,
1302- height : int = 400 , attribute_names : List [str ] = None , name : str = '' ):
1304+ height : int = 400 , attribute_names : List [str ] = None , axis_on : bool = False , name : str = '' ):
13031305 self .primitives = primitives
13041306 self .attribute_names = attribute_names
1305- super ().__init__ (width = width , height = height , type_ = 'draw' , name = name )
1307+ super ().__init__ (width = width , height = height , type_ = 'draw' , axis_on = axis_on , name = name )
13061308
13071309 def mpl_plot (self , ax = None , equal_aspect = True , ** kwargs ):
13081310 """ Plots using matplotlib. """
@@ -1360,7 +1362,8 @@ class PrimitiveGroupsContainer(Figure):
13601362
13611363 def __init__ (self , primitive_groups : List [PrimitiveGroup ], sizes : List [Tuple [float , float ]] = None ,
13621364 coords : List [Tuple [float , float ]] = None , associated_elements : List [int ] = None ,
1363- x_variable : str = None , y_variable : str = None , width : int = 750 , height : int = 400 , name : str = '' ):
1365+ x_variable : str = None , y_variable : str = None , width : int = 750 , height : int = 400 ,
1366+ axis_on : bool = True , name : str = '' ):
13641367 for i , value in enumerate (primitive_groups ):
13651368 if not isinstance (value , PrimitiveGroup ):
13661369 primitive_groups [i ] = PrimitiveGroup (primitives = value )
@@ -1378,7 +1381,7 @@ def __init__(self, primitive_groups: List[PrimitiveGroup], sizes: List[Tuple[flo
13781381 if y_variable :
13791382 attribute_names .append (y_variable )
13801383 self .association ['attribute_names' ] = attribute_names
1381- super ().__init__ (width = width , height = height , type_ = 'primitivegroupcontainer' , name = name )
1384+ super ().__init__ (width = width , height = height , type_ = 'primitivegroupcontainer' , axis_on = axis_on , name = name )
13821385
13831386
13841387class ParallelPlot (Figure ):
@@ -1399,7 +1402,7 @@ class ParallelPlot(Figure):
13991402
14001403 def __init__ (self , elements : List [Sample ] = None , edge_style : EdgeStyle = None , disposition : str = None ,
14011404 axes : List [str ] = None , rgbs : List [Tuple [int , int , int ]] = None , width : int = 750 , height : int = 400 ,
1402- name : str = '' ):
1405+ axis_on : bool = True , name : str = '' ):
14031406 if elements is None :
14041407 elements = []
14051408 sampled_elements = []
@@ -1418,7 +1421,7 @@ def __init__(self, elements: List[Sample] = None, edge_style: EdgeStyle = None,
14181421 self .disposition = disposition
14191422 self .attribute_names = axes
14201423 self .rgbs = rgbs
1421- super ().__init__ (width = width , height = height , type_ = 'parallelplot' , name = name )
1424+ super ().__init__ (width = width , height = height , type_ = 'parallelplot' , axis_on = axis_on , name = name )
14221425
14231426
14241427class Histogram (Figure ):
@@ -1446,7 +1449,7 @@ class Histogram(Figure):
14461449
14471450 def __init__ (self , x_variable : str , elements = None , axis : Axis = None , graduation_nb : float = None ,
14481451 edge_style : EdgeStyle = None , surface_style : SurfaceStyle = None , width : int = 750 , height : int = 400 ,
1449- name : str = '' ):
1452+ axis_on : bool = True , name : str = '' ):
14501453 if elements is None :
14511454 elements = []
14521455 sampled_elements = []
@@ -1466,7 +1469,7 @@ def __init__(self, x_variable: str, elements=None, axis: Axis = None, graduation
14661469 self .graduation_nb = graduation_nb
14671470 self .edge_style = edge_style
14681471 self .surface_style = surface_style
1469- super ().__init__ (width = width , height = height , type_ = 'histogram' , name = name )
1472+ super ().__init__ (width = width , height = height , type_ = 'histogram' , axis_on = axis_on , name = name )
14701473
14711474
14721475class MultiplePlots (Figure ):
@@ -1486,7 +1489,8 @@ class MultiplePlots(Figure):
14861489
14871490 def __init__ (self , plots : List [PlotDataObject ], sizes : List [Window ] = None , elements : List [Sample ] = None ,
14881491 coords : List [Tuple [float , float ]] = None , point_families : List [PointFamily ] = None ,
1489- initial_view_on : bool = None , width : int = 750 , height : int = 400 , name : str = '' ):
1492+ initial_view_on : bool = None , width : int = 750 , height : int = 400 , axis_on : bool = True ,
1493+ name : str = '' ):
14901494 if elements is None :
14911495 elements = []
14921496 sampled_elements = []
@@ -1506,7 +1510,7 @@ def __init__(self, plots: List[PlotDataObject], sizes: List[Window] = None, elem
15061510 self .coords = coords
15071511 self .points_sets = point_families
15081512 self .initial_view_on = initial_view_on
1509- super ().__init__ (width = width , height = height , type_ = 'multiplot' , name = name )
1513+ super ().__init__ (width = width , height = height , type_ = 'multiplot' , axis_on = axis_on , name = name )
15101514
15111515
15121516def plot_data_path (local : bool = False , version : str = None ):
0 commit comments