Error in getting curve through python

Hi Jonathan

Yes you are right. It works for single bar but not for multi bars. Please see attached image.

Can you please suggest anything to get same output for multi bars.