plot figures using js library