# Can I plot 3d surface (3d list plot) in paraview. (data has the form of array)

**URL:** https://discourse.paraview.org/t/can-i-plot-3d-surface-3d-list-plot-in-paraview-data-has-the-form-of-array/4629
**Category:** ParaView Support
**Created:** [June 20, 2020, 12:06pm UTC](https://discourse.paraview.org/t/can-i-plot-3d-surface-3d-list-plot-in-paraview-data-has-the-form-of-array/4629 "2020-06-20T12:06:36Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Kenichiro-Yoshimi](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/ecc23a/32.png) [@Kenichiro-Yoshimi](https://discourse.paraview.org/u/Kenichiro-Yoshimi)
#### Post date: [June 21, 2020, 3:35am UTC](https://discourse.paraview.org/t/can-i-plot-3d-surface-3d-list-plot-in-paraview-data-has-the-form-of-array/4629/2 "2020-06-21T03:35:34Z")

</div>

Hello,

Maybe there is not 3D plots in ParaView:  
[https://discourse.paraview.org/t/plotting-points-on-a-rectangular-grid-with-paraview/3146](http://plotting-points-on-a-rectangular-grid-with-paraview)

Therefore, I tried to use a **Programmable Source** with your data, but it was a bit complicated. (state file is here: [3d\_plot.pvsm](https://discourse.paraview.org/uploads/short-url/f4W8MlHyZxxLReP24IXT9tbaZnv.pvsm) (298.2 KB) )

1. Set the **Output Data Set Type** to **vtkImageData** under the Programmable Source Properties.

2. Declare the extent in **Script (RequestInformation)**.

```python
from paraview import util
util.SetOutputWholeExtent(self, [0, 3000, 0, 50, 0, 0])

```

1. Load the data and assign them to the source output as a field data in **Script**. You need to modify “Path/To/Data/Folder”.

```python
import numpy as np
from io import StringIO

output.SetDimensions(3001,51,1)
output.SetSpacing(1,60,1)

file_name = 'Path/To/Data/Folder/data_1.txt'

# remove \t at the end of sentence
file = open(file_name,'r')
string = file.read()
file.close()
string = string.strip('\t')
string = StringIO(string)

data = np.loadtxt(string)
print(data.shape)

output.PointData.append(data.flatten(), 'data_1')

```

1. Apply the **Warp by Scalar filter**.

 ![3d_plot](https://discourse.paraview.org/uploads/default/original/2X/1/17a83864c332b8613067f3295393d2877a142aea.png)

---

_[View the full topic](https://discourse.paraview.org/t/can-i-plot-3d-surface-3d-list-plot-in-paraview-data-has-the-form-of-array/4629)._
