Have a look at Python-based backend frameworks like Django or Flask.
Django: https://docs.djangoproject.com/latest/
Flask: https://flask.palletsprojects.com/en/stable/
These have great documentations to get you started quickly and great community support for ongoing usage.
The idea is to take service-oriented approach. You have Angular frontend application to serve the pages and a backend application (using one of the above frameworks you choose) to serve the Python code. When required to execute the Python code, some action on your Angular application would call an API served by your backend. This API will point to some form of method where you can run your Python code as necessary, and serve back either the visualization itself or any data as a blob/json response that Angular can read/consume.
I understand it may add an overhead of running a separate backend just to execute a Python script, but it's something to consider for yourself. Perhaps you may want to execute more scripts for different visualizations, use cases, conditionally, etc. or utilize database functionalities that Angular may not provide.