Need fairly simple graphics, cross platform, in Jupiter Notebook and elsewhere too

For a Robotics project I would like to write some code to simple, animated graphics. The requirements for me are:

  • 2d coordinate system
  • lines, polygons, ellipses, etc, marked off in x-y coordinates
  • display icons and images
  • animations can be implemented by generating frames in a loop
  • should work both when launching apps from command line and calling my code from a Jupiter notebook
  • mainstream, actively supported

Any recommendations?

I don’t know how it would get on with Jupyter, but Pygame might be a good place to start.