# Dash Python: Numpy meshgrid surface plot callback issue

**URL:** <https://community.plotly.com/t/dash-python-numpy-meshgrid-surface-plot-callback-issue/52472>\
**Category:** Dash Python\
**Created:** [April 29, 2021, 3:59am UTC](https://community.plotly.com/t/dash-python-numpy-meshgrid-surface-plot-callback-issue/52472 "2021-04-29T03:59:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![roboticsmick](https://avatars.discourse-cdn.com/v4/letter/r/7c8e57/32.png) [@roboticsmick](https://community.plotly.com/u/roboticsmick)\
**Post date:** [April 29, 2021, 3:59am UTC](https://community.plotly.com/t/dash-python-numpy-meshgrid-surface-plot-callback-issue/52472/1 "2021-04-29T03:59:05Z")

</div>

Hi All,

If I generate a large numpy meshgrid in a callback, how do I reference it in a seperate callback to plot a surface plot?

My app so far has the follow feature list:

Callback 1. User uploads csv using dcc.Upload()

Callback 2:  
Generates three dropdown menus based on the table column where I can select the latitude, longtitude, depth columns.

Callback 3: Generates numpy meshgrid from selected latitude, longtitude, depth columns.

\*\*\* This is where I have an issue. This is a 15+ second calculation so I don’t want to repeat it. The dataset can also be huge (10000 x 10000).

I want the surface plot to be generated based on this numpy meshgrid and a opacity slider value. If the user changes the opacity slider, I don’t want to do another 15 second calculation, when the data has already been calculated. So I think this means I need to plot the surface data in a seperate callback?

Callback 4 (goal): Plots surface plot based on numpy meshgrid and opacity slider value.

Thanks for any feedback.
