# Generate 3D PostScript out of plot

**URL:** <https://community.freefem.org/t/generate-3d-postscript-out-of-plot/1901>\
**Category:** General Discussion\
**Created:** [July 20, 2022, 7:03am UTC](https://community.freefem.org/t/generate-3d-postscript-out-of-plot/1901 "2022-07-20T07:03:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Curiin](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@Curiin](https://community.freefem.org/u/Curiin)\
**Post date:** [July 20, 2022, 7:03am UTC](https://community.freefem.org/t/generate-3d-postscript-out-of-plot/1901/1 "2022-07-20T07:03:35Z")

</div>

Hi there,

I’m trying to save a plot in 3D. Meaning: I have a function and when I use `plot`, I want to save the image that appears after I press 3 (giving me the 3D view) using postscript `ps`.  
I’ve figured out that in the `plot` function I can set `dim=3` and the view is in 3D. But even then, the post script output file is the picture from the 2D view.  
In the documentation I also read about `savevtk` but it’s not clear to me if this vtk output file will be an image? I’ve tried to use it as explained in 6.4.4 Paraview, but I don’t know what to do with the output.

I’ve attached a small example of what I mean.  
[PostScript-Plot.edp](https://community.freefem.org/uploads/short-url/teV0XYUb2lOWDHM45F6JyfqiFEI.edp) (93 Bytes)

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Post date:** [July 20, 2022, 9:00am UTC](https://community.freefem.org/t/generate-3d-postscript-out-of-plot/1901/2 "2022-07-20T09:00:25Z")

</div>

I am not familiar with the plot command - I strongly recommend you try out `savevtk ` + paraview. The basic operations in paraview are not hard to figure out on your own, and I think there is a large amount material (e.g. youtube videos) on how to use paraview.

---

<div class="post-metadata">

**Author:** ![Curiin](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@Curiin](https://community.freefem.org/u/Curiin)\
**Post date:** [July 20, 2022, 4:43pm UTC](https://community.freefem.org/t/generate-3d-postscript-out-of-plot/1901/3 "2022-07-20T16:43:23Z")

</div>

Hi @aszaboa,  
Thanks for your input. I’ve looked into Paraview but I can’t find how it can do what I’m looking for.  
What I want is to save the following (without having to make a screenshot of it of course):

 ![Bildschirmfoto 2022-07-20 um 18.40.59](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/f/f3314b2ea0af8226a07f48b402e82e2db0e0bdcb.jpeg)  
Do you know how to do this in Paraview?

---

<div class="post-metadata">

**Author:** ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Post date:** [July 20, 2022, 6:29pm UTC](https://community.freefem.org/t/generate-3d-postscript-out-of-plot/1901/4 "2022-07-20T18:29:55Z")

</div>

I think you need the `WarpByScalar` filter.

---

<div class="post-metadata">

**Author:** ![Curiin](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@Curiin](https://community.freefem.org/u/Curiin)\
**Post date:** [July 21, 2022, 3:32pm UTC](https://community.freefem.org/t/generate-3d-postscript-out-of-plot/1901/5 "2022-07-21T15:32:18Z")

</div>

Perfect, thank you very much!
