# Mesh3d subplots

**URL:** <https://community.plotly.com/t/mesh3d-subplots/18654>\
**Category:** 📊 Plotly Python\
**Created:** [January 28, 2019, 2:31am UTC](https://community.plotly.com/t/mesh3d-subplots/18654 "2019-01-28T02:31:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vasily](https://avatars.discourse-cdn.com/v4/letter/v/94ad74/32.png) [@vasily](https://community.plotly.com/u/vasily)\
**Post date:** [January 28, 2019, 2:31am UTC](https://community.plotly.com/t/mesh3d-subplots/18654/1 "2019-01-28T02:31:45Z")

</div>

Hello.  
Suppose that I want to create, say, 4 subplots (2 x 2), for simplicity, the same mesh3d object in all the subplots.  
How I can I create “trace” from my “data” and “layout” ?  
Thank you.

data = [  
go.Mesh3d(  
x = [0, 0, 1, 1, 0, 0, 1, 1],  
y = [0, 1, 1, 0, 0, 1, 1, 0],  
z = [0, 0, 0, 0, 1, 1, 1, 1],  
colorbar = go.ColorBar(  
title=‘z’  
),  
colorscale = [[0, ‘rgb(255, 0, 255)’],  
[0.5, ‘rgb(0, 255, 0)’],  
[1, ‘rgb(0, 0, 255)’]],  
intensity = np.linspace(0,10,8),  
i = [7, 0, 0, 0, 4, 4, 6, 6, 4, 0, 3, 2],  
j = [3, 4, 1, 2, 5, 6, 5, 2, 0, 1, 6, 3],  
k = [0, 7, 2, 3, 6, 7, 1, 1, 5, 5, 7, 6],  
name=‘y’,  
showscale=True  
)  
]  
layout = go.Layout(  
xaxis=go.XAxis(  
title=‘x’  
),  
yaxis=go.YAxis(  
title=‘y’  
)  
)

trace = ???  
fig = tools.make\_subplots(rows=2, cols=2)  
fig.append\_trace(trace, 1, 1)  
fig.append\_trace(trace, 1, 2)  
fig.append\_trace(trace, 2, 1)  
fig.append\_trace(trace, 2, 2)

---

<div class="post-metadata">

**Author:** ![jmmease](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jmmease/32/3706_2.png) [@jmmease](https://community.plotly.com/u/jmmease)\
**Post date:** [January 28, 2019, 10:59am UTC](https://community.plotly.com/t/mesh3d-subplots/18654/2 "2019-01-28T10:59:37Z")

</div>

Hi @vasily,

The approach used in this 3D surface subplots example ([https://plot.ly/python/3d-subplots/#3d-surface-subplots](https://plot.ly/python/3d-subplots/#3d-surface-subplots)) should work for mesh3d traces as well. In particular, note the use of the `specs` argument to `make_subplots`.

Hope that helps!  
-Jon
