Guest User

Untitled

a guest
Jun 20th, 2019
75
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. traces = []
  2. for i in range(armormax):
  3. traces.append([])
  4. for t in types:
  5. traces[-1].append(go.Bar(
  6. x=["A", "B"], # weaponnames,
  7. y=[i, armormax - i], # [damage[0][x][t] for x in weaponnames],
  8. name=t[-3]
  9. ))
  10.  
  11. layout = dict(xaxis=dict(zeroline=False, autorange=True),
  12. yaxis=dict(autorange=True, zeroline=False),
  13. title='Compare', hovermode='closest',
  14. updatemenus=[{'type': 'buttons',
  15. 'buttons': [{'label': 'Play',
  16. 'method': 'animate',
  17. 'args': [None]}]}])
  18. frames = []
  19. for i in range(0, armormax):
  20. frames.append(Frame(name=str(i), data=traces[i]))
  21.  
  22. data = traces[0]
  23.  
  24. figure1 = dict(data=data, layout=layout, frames=tuple(frames))
  25.  
  26. offline.plot(figure1, image_filename="weapontypes")
RAW Paste Data