simulariumio/plot_readers/histogram_plot_reader.py
def read(self, data: Dict[str, Any]) -> Dict[str, Any]:
        """
        Return an object containing the data shaped for Simularium format
        """
        print("Reading Histogram Data -------------")
        simularium_data = {}
        # layout info
        simularium_data["layout"] = {
            "title": data.title,
            "xaxis": {"title": data.xaxis_title},
            "yaxis": {"title": "frequency"},
        }
        # plot data
        simularium_data["data"] = []
        for trace_name in data.traces:
            simularium_data["data"].append(
                {
                    "name": trace_name,
                    "type": "histogram",
                    "x": data.traces[trace_name].tolist(),
                }
            )
        return simularium_data

        Return an object containing the data shaped for Simularium format
        
Return an object containing the data shaped for Simularium format
Return an object containing the data shaped for Simularium format
def read(self, data: Dict[str, Any]) -> Dict[str, Any]:
        print("Reading Histogram Data -------------")
        simularium_data = {}
        simularium_data["layout"] = {
            "title": data.title,
            "xaxis": {"title": data.xaxis_title},
            "yaxis": {"title": "frequency"},
        }
        simularium_data["data"] = []
        for trace_name in data.traces:
            simularium_data["data"].append(
                {
                    "name": trace_name,
                    "type": "histogram",
                    "x": data.traces[trace_name].tolist(),
                }
            )
        return simularium_data
def read ( self , data : Dict [ str , Any ] ) -> Dict [ str , Any ] : print ( "Reading Histogram Data -------------" ) simularium_data = { } simularium_data [ "layout" ] = { "title" : data . title , "xaxis" : { "title" : data . xaxis_title } , "yaxis" : { "title" : "frequency" } , } simularium_data [ "data" ] = [ ] for trace_name in data . traces : simularium_data [ "data" ] . append ( { "name" : trace_name , "type" : "histogram" , "x" : data . traces [ trace_name ] . tolist ( ) , } ) return simularium_data
Return an object containing the data shaped for Simularium format
Return an object containing the data shaped for Simularium format
"""
        Return an object containing the data shaped for Simularium format
        """ # layout info # plot data
self
data
Dict[str, Any]