diff --git a/volia/plot.py b/volia/plot.py index 7ae4be7..2a9ce4d 100644 --- a/volia/plot.py +++ b/volia/plot.py @@ -46,6 +46,18 @@ def scatter_plot(features: str, labels: str, outfile: str): print("Your plot is saved well (no check of this affirmation)") +def interactive_scatter_plot(features: str, labels: str, outdir: str): + """Generate an interactive scatter plot in 3D. Mainly used for + data visualisation processed with tsne or algorithm like + this later. This visualization is generated in Web files. + + Args: + features (str): Features file in 2d or 3d + labels (str): Labels file + outdir (str) : output directory where Web files are saved + """ + pass + if __name__ == '__main__': @@ -60,12 +72,21 @@ if __name__ == '__main__': parser_scatter.add_argument("--outfile", default="./out.pdf", type=str, help="Specify the output file (better in pdf)") parser_scatter.set_defaults(which="scatter") + + # interactive scatter + parser_interactive_scatter = subparsers.add_parser("interactive_scatter") + parser_interactive_scatter.add_argument("features", type=str, help="features files with only 3D will be converted into csv") + parser_scatter.add_argument("--labels", default=None, type=str, help="Specify the labels of each utterance/element") + parser_scatter.add_argument("--outdir", default=".out", type=str, help="output directoy where static web and data files are saved.") + parser_scatter.set_defaults(which="interactive_scatter") + # Parse args = parser.parse_args() # Run commands runner = SubCommandRunner({ - "scatter" : scatter_plot + "scatter" : scatter_plot, + "interactive_scatter" : interactive_scatter_plot }) runner.run(args.which, args.__dict__, remove="which") \ No newline at end of file