Skip to content
Advertisement

How to loop through lists to create multiple plots Python

I have the following three lists:

JavaScript

I was wondering how I can take these 3 lists and iterate through them to get lists

so the first plot would be plotting dog as title with y value as the first list in 2d list 2 and the x value would the first list in 2d list 3. This would iterate for each value.

My idea is I think to zip these 3 lists like result = zip(list1,list2,list3)

and then somehow iterate to do something like this but Python says zip object is not subscriptable

JavaScript

Could anyone explain how I can do this??

Advertisement

Answer

It seems to me that you want something fairly straightforward:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement