Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import plotly.plotly as py
- import plotly.graph_objs as go
- data = [
- go.Surface(
- z = p # p is a 2D square matrix.
- )
- ]
- data[0]['surfacecolor'] = u #Setting surface color with another 2D square matrix `u` of the same shape as `p`
- layout = go.Layout(
- xaxis = go.layout.XAxis(
- title = go.layout.xaxis.Title(
- text='x Axis'),
- font=dict(
- family='Courier New, monospace',
- size=18,
- color='#7f7f7f'
- )
- ),
- title = go.layout.Title(
- text='Mean Pressure Field 0.25 Granularity, Colored by Mean Particle Velocity (X-direction)'
- ),
- autosize=False,
- width=1000,
- height=1000,
- margin=dict(
- l=65,
- r=50,
- b=65,
- t=90
- ),
- )
- fig = go.Figure(data=data,
- layout=layout)
- py.iplot(fig, filename='saveplot.png')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement