@@ -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
@@ -876,7 +877,7 @@ class Graph2D(Figure):
876877
877878 def __init__ (self , graphs : List [Dataset ], x_variable : str , y_variable : str , axis : Axis = None ,
878879 log_scale_x : bool = None , log_scale_y : bool = None , width : int = 750 , height : int = 400 ,
879- name : str = '' ):
880+ axis_on : bool = True , name : str = '' ):
880881 self .graphs = graphs
881882 self .attribute_names = [x_variable , y_variable ]
882883 if axis is None :
@@ -885,7 +886,7 @@ def __init__(self, graphs: List[Dataset], x_variable: str, y_variable: str, axis
885886 self .axis = axis
886887 self .log_scale_x = log_scale_x
887888 self .log_scale_y = log_scale_y
888- super ().__init__ (width = width , height = height , type_ = 'graph2d' , name = name )
889+ super ().__init__ (width = width , height = height , type_ = 'graph2d' , axis_on = axis_on , name = name )
889890
890891 def mpl_plot (self , ax = None , ** kwargs ):
891892 """ Plots using matplotlib. """
@@ -1052,7 +1053,7 @@ class Scatter(Figure):
10521053 def __init__ (self , x_variable : str = None , y_variable : str = None , tooltip : Tooltip = None ,
10531054 point_style : PointStyle = None , elements : List [Sample ] = None , points_sets : List [PointFamily ] = None ,
10541055 axis : Axis = None , log_scale_x : bool = None , log_scale_y : bool = None , heatmap : Heatmap = None ,
1055- heatmap_view : bool = None , width : int = 750 , height : int = 400 , name : str = '' ):
1056+ heatmap_view : bool = None , width : int = 750 , height : int = 400 , axis_on : bool = True , name : str = '' ):
10561057 self .tooltip = tooltip
10571058 self .attribute_names = [x_variable , y_variable ]
10581059 self .point_style = point_style
@@ -1079,7 +1080,7 @@ def __init__(self, x_variable: str = None, y_variable: str = None, tooltip: Tool
10791080 self .heatmap = heatmap
10801081 self .heatmap_view = heatmap_view
10811082 self .points_sets = points_sets
1082- super ().__init__ (width = width , height = height , type_ = 'scatterplot' , name = name )
1083+ super ().__init__ (width = width , height = height , type_ = 'scatterplot' , axis_on = axis_on , name = name )
10831084
10841085
10851086class ScatterMatrix (Figure ):
@@ -1089,7 +1090,8 @@ class ScatterMatrix(Figure):
10891090 _plot_buttons = "MULTIPLOT_BUTTONS"
10901091
10911092 def __init__ (self , elements : List [Sample ] = None , axes : List [str ] = None , point_style : PointStyle = None ,
1092- surface_style : SurfaceStyle = None , width : int = 750 , height : int = 400 , name : str = "" ):
1093+ surface_style : SurfaceStyle = None , width : int = 750 , height : int = 400 , axis_on : bool = True ,
1094+ name : str = "" ):
10931095 if elements is None :
10941096 elements = []
10951097 sampled_elements = []
@@ -1109,7 +1111,7 @@ def __init__(self, elements: List[Sample] = None, axes: List[str] = None, point_
11091111 self .surface_style = surface_style
11101112 self .plots = self ._build_multiplot ()
11111113 self .initial_view_on = True
1112- super ().__init__ (width = width , height = height , type_ = "multiplot" , name = name )
1114+ super ().__init__ (width = width , height = height , type_ = "multiplot" , axis_on = axis_on , name = name )
11131115
11141116 def _build_multiplot (self ):
11151117 sample_attributes = self .elements [0 ].values .keys ()
@@ -1296,10 +1298,10 @@ class PrimitiveGroup(Figure):
12961298
12971299 def __init__ (self , primitives : List [Union [Contour2D , Arc2D , LineSegment2D , Circle2D ,
12981300 Line2D , MultipleLabels , Wire , Point2D ]], width : int = 750 ,
1299- height : int = 400 , attribute_names : List [str ] = None , name : str = '' ):
1301+ height : int = 400 , attribute_names : List [str ] = None , axis_on : bool = False , name : str = '' ):
13001302 self .primitives = primitives
13011303 self .attribute_names = attribute_names
1302- super ().__init__ (width = width , height = height , type_ = 'draw' , name = name )
1304+ super ().__init__ (width = width , height = height , type_ = 'draw' , axis_on = axis_on , name = name )
13031305
13041306 def mpl_plot (self , ax = None , equal_aspect = True , ** kwargs ):
13051307 """ Plots using matplotlib. """
@@ -1357,7 +1359,8 @@ class PrimitiveGroupsContainer(Figure):
13571359
13581360 def __init__ (self , primitive_groups : List [PrimitiveGroup ], sizes : List [Tuple [float , float ]] = None ,
13591361 coords : List [Tuple [float , float ]] = None , associated_elements : List [int ] = None ,
1360- x_variable : str = None , y_variable : str = None , width : int = 750 , height : int = 400 , name : str = '' ):
1362+ x_variable : str = None , y_variable : str = None , width : int = 750 , height : int = 400 ,
1363+ axis_on : bool = True , name : str = '' ):
13611364 for i , value in enumerate (primitive_groups ):
13621365 if not isinstance (value , PrimitiveGroup ):
13631366 primitive_groups [i ] = PrimitiveGroup (primitives = value )
@@ -1375,7 +1378,7 @@ def __init__(self, primitive_groups: List[PrimitiveGroup], sizes: List[Tuple[flo
13751378 if y_variable :
13761379 attribute_names .append (y_variable )
13771380 self .association ['attribute_names' ] = attribute_names
1378- super ().__init__ (width = width , height = height , type_ = 'primitivegroupcontainer' , name = name )
1381+ super ().__init__ (width = width , height = height , type_ = 'primitivegroupcontainer' , axis_on = axis_on , name = name )
13791382
13801383
13811384class ParallelPlot (Figure ):
@@ -1396,7 +1399,7 @@ class ParallelPlot(Figure):
13961399
13971400 def __init__ (self , elements : List [Sample ] = None , edge_style : EdgeStyle = None , disposition : str = None ,
13981401 axes : List [str ] = None , rgbs : List [Tuple [int , int , int ]] = None , width : int = 750 , height : int = 400 ,
1399- name : str = '' ):
1402+ axis_on : bool = True , name : str = '' ):
14001403 if elements is None :
14011404 elements = []
14021405 sampled_elements = []
@@ -1415,7 +1418,7 @@ def __init__(self, elements: List[Sample] = None, edge_style: EdgeStyle = None,
14151418 self .disposition = disposition
14161419 self .attribute_names = axes
14171420 self .rgbs = rgbs
1418- super ().__init__ (width = width , height = height , type_ = 'parallelplot' , name = name )
1421+ super ().__init__ (width = width , height = height , type_ = 'parallelplot' , axis_on = axis_on , name = name )
14191422
14201423
14211424class Histogram (Figure ):
@@ -1443,7 +1446,7 @@ class Histogram(Figure):
14431446
14441447 def __init__ (self , x_variable : str , elements = None , axis : Axis = None , graduation_nb : float = None ,
14451448 edge_style : EdgeStyle = None , surface_style : SurfaceStyle = None , width : int = 750 , height : int = 400 ,
1446- name : str = '' ):
1449+ axis_on : bool = True , name : str = '' ):
14471450 if elements is None :
14481451 elements = []
14491452 sampled_elements = []
@@ -1463,7 +1466,7 @@ def __init__(self, x_variable: str, elements=None, axis: Axis = None, graduation
14631466 self .graduation_nb = graduation_nb
14641467 self .edge_style = edge_style
14651468 self .surface_style = surface_style
1466- super ().__init__ (width = width , height = height , type_ = 'histogram' , name = name )
1469+ super ().__init__ (width = width , height = height , type_ = 'histogram' , axis_on = axis_on , name = name )
14671470
14681471
14691472class MultiplePlots (Figure ):
@@ -1483,7 +1486,8 @@ class MultiplePlots(Figure):
14831486
14841487 def __init__ (self , plots : List [PlotDataObject ], sizes : List [Window ] = None , elements : List [Sample ] = None ,
14851488 coords : List [Tuple [float , float ]] = None , point_families : List [PointFamily ] = None ,
1486- initial_view_on : bool = None , width : int = 750 , height : int = 400 , name : str = '' ):
1489+ initial_view_on : bool = None , width : int = 750 , height : int = 400 , axis_on : bool = True ,
1490+ name : str = '' ):
14871491 if elements is None :
14881492 elements = []
14891493 sampled_elements = []
@@ -1503,7 +1507,7 @@ def __init__(self, plots: List[PlotDataObject], sizes: List[Window] = None, elem
15031507 self .coords = coords
15041508 self .points_sets = point_families
15051509 self .initial_view_on = initial_view_on
1506- super ().__init__ (width = width , height = height , type_ = 'multiplot' , name = name )
1510+ super ().__init__ (width = width , height = height , type_ = 'multiplot' , axis_on = axis_on , name = name )
15071511
15081512
15091513def plot_data_path (local : bool = False , version : str = None ):
0 commit comments