Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. import plotly.plotly as py
  2. import plotly.graph_objs as go
  3.  
  4. data = [
  5. go.Surface(
  6. z = p # p is a 2D square matrix.
  7. )
  8. ]
  9. data[0]['surfacecolor'] = u #Setting surface color with another 2D square matrix `u` of the same shape as `p`
  10.  
  11. layout = go.Layout(
  12. xaxis = go.layout.XAxis(
  13. title = go.layout.xaxis.Title(
  14. text='x Axis'),
  15. font=dict(
  16. family='Courier New, monospace',
  17. size=18,
  18. color='#7f7f7f'
  19. )
  20. ),
  21. title = go.layout.Title(
  22. text='Mean Pressure Field 0.25 Granularity, Colored by Mean Particle Velocity (X-direction)'
  23. ),
  24. autosize=False,
  25. width=1000,
  26. height=1000,
  27. margin=dict(
  28. l=65,
  29. r=50,
  30. b=65,
  31. t=90
  32. ),
  33. )
  34.  
  35. fig = go.Figure(data=data,
  36. layout=layout)
  37.  
  38. py.iplot(fig, filename='saveplot.png')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement