# Trying to understand difference between 3D and 2D plot

**URL:** <https://community.freefem.org/t/trying-to-understand-difference-between-3d-and-2d-plot/2761>\
**Category:** General Discussion\
**Created:** [October 26, 2023, 11:23pm UTC](https://community.freefem.org/t/trying-to-understand-difference-between-3d-and-2d-plot/2761 "2023-10-26T23:23:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsmacd](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jsmacd](https://community.freefem.org/u/jsmacd)\
**Post date:** [October 26, 2023, 11:23pm UTC](https://community.freefem.org/t/trying-to-understand-difference-between-3d-and-2d-plot/2761/1 "2023-10-26T23:23:41Z")

</div>

Dear Community,

I am trying to understand why in my 3D plot it looks like this function has a pole in the middle (centred along the line (0.5, 0,5 s)), but when I project it onto a 2D cross-section I no longer see this.

```auto
load "msh3" // to use cube

int n = 11;
real gridh = 1./n;

int c = 2;
real H = gridh*c;
cout << "support is fixed at H = " << H << ", grid size is h = " << gridh << endl;

func f = (12./(pi*H^2))*(sqrt((x - 0.5)^2 + (y - 0.5)^2)/H);
mesh3 Th = cube(n, n, n); // labels 1: y = 0, 2: x = 1, 3: y = 1; 4: x = 0; 5: z = 0; 6: z = 1;
mesh Th2 = square(n, n);

// // fespace for solution
fespace Vh(Th, P1);
Vh fh = f;

fespace Vh2(Th2, P1);
Vh2 fcut;

plot(fh, wait = true, fill = true, value = true);

// take some cuts
real[int] zcutVec = [0, 0.4, 0.6, 1];
for(int j = 0; j< zcutVec.n; j++){
  fcut = fh(x,y,zcutVec(j));
   plot(fcut, nbiso = 30, wait = true, fill = true, value = true);
}

cout << "END OF PROGRAM" << endl;

```
