get_src_path('parag'
)
WARNING:root:package is installed in the development mode
WARNING:root:running the function in a nbdev nb
'.'
get_colors (subsets:list, cmap_subsets:str=None, test:bool=False)
*Get colors by items
Args: subsets (list): list of items cmap_subsets (str, optional): colormap. Defaults to None. test (bool, optional): test-mode. Defaults to False.
Returns: dict: colors by items*
export_plot (spec:dict, outp:str, redirect=None, hyperlink=None, verbose=False)
*Export the vega plot
Args: spec (dict): vega config outp (str): output path redirect: for redirecting the outputs displayed*
display_plot (spec:dict, method:str='vega', defaults:dict=None)
*Display plot
Args: spec (dict): vega config method (str, optional): method. Defaults to ‘vega’.*
Type | Default | Details | |
---|---|---|---|
spec | dict | ||
method | str | vega | vegalite |
defaults | dict | None |
get_src_path (pkg_name='parag')
*Get the package’s source directory path.
Returns: str: path*
WARNING:root:package is installed in the development mode
WARNING:root:running the function in a nbdev nb
'.'
display_plot({
# "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "A simple bar chart with embedded data.",
"data": {
"values": [
{"a": "A", "b": 28}, {"a": "B", "b": 55}, {"a": "C", "b": 43},
{"a": "D", "b": 91}, {"a": "E", "b": 81}, {"a": "F", "b": 53},
{"a": "G", "b": 19}, {"a": "H", "b": 87}, {"a": "I", "b": 52}
]
},
"mark": "bar",
"encoding": {
"x": {"field": "a", "type": "nominal", "axis": {"labelAngle": 0}},
"y": {"field": "b", "type": "quantitative"}
}
}
)