Ask Your Question

BenBoggart's profile - activity

2023-07-19 15:49:36 +0200 received badge  Notable Question (source)
2023-01-10 17:19:48 +0200 received badge  Student (source)
2022-12-29 10:40:12 +0200 received badge  Popular Question (source)
2022-06-04 22:06:31 +0200 commented question Plot 3d data

Thanks, appreciated, and RTFM is certainly the appropriate reply. It's probably just strange to me, that after importin

2022-06-04 19:07:11 +0200 commented question Plot 3d data

I'll have to retract my statement partially, one of the things I thought I've learnt, I didn't: If I put my full data i

2022-06-04 19:06:52 +0200 commented question Plot 3d data

I'll have to retract my statement partially, one of the things I thought I've learnt, I didn't: If I put my full data i

2022-06-04 19:02:10 +0200 commented question Plot 3d data

I'll have to retract my statement partially, one of the things I thought I've learnt, I didn't: If I put my complete da

2022-06-04 18:59:48 +0200 commented question Plot 3d data

I'll have to retract my statement partially, one of the things I thought I've learnt, I didn't: If I put my complete da

2022-06-04 18:55:30 +0200 commented question Plot 3d data

I'll have to retract my statement partially, one of the things I thought I've learnt, I didn't. If I put my complete dat

2022-06-04 18:51:20 +0200 commented question Plot 3d data

I'll have to retract my statement, one of the things I thought I've learnt, I didn't. If I put my complete data in https

2022-06-04 18:50:12 +0200 commented question Plot 3d data

I'll have to retract my statement, one of the things I thought I've learnt, I didn't. If I put my complete data in https

2022-06-04 18:49:40 +0200 commented question Plot 3d data

I'll have to retract my statement, one of the things I thought I've learnt, I didn't. If I put my complete data in https

2022-06-04 18:34:35 +0200 marked best answer Plot 3d data

I've been unable to find any viable solution although I'm quite sure there's an easy one.

I'd like to plot a surface from a matrix with some hundred rows that specify a point each, i.e. x y z. The point3d function does the ranges right but lacks the surface option; list_plot3d provides the surface, but does plot by the row/colum indeces instead of the x,y values.

Which function would do the trick?

Ben


(Edit) Thank you both, Frédéric and Emmanuel! Unfortunately, I cannot apply your answers to my problem properly, mainly because I dont fully understand them.

  • In Frédéric's answer, M seem's to be a 2x2x3 array and I'm unable to transfer the approach to my Nx3 matrix.
  • Emmanuel's list(zip(X,Y,Z)) looks very much like list(myMatrix), but with list_plot3d I still don't get anything like the anticipated result.

I'll try to provide my example here:

myMatrix=[(0.5, 0.0, 29.0),
 (1.5, 0.0, 29.0),
 (2.5, 0.0, 30.0),
 (3.5, 0.0, 38.0),
 (5.0, 0.0, 45.0),
 (5.01, 0.0, 0.0),
 (6.0, 0.0, 0.0),
 (0.0, 0.8, 26.0),
 (0.5, 0.8, 25.0),
 (1.5, 0.8, 24.0),
 (2.5, 0.8, 25.0),
 (3.5, 0.8, 35.0),
 (5.0, 0.8, 39.0),
 (5.01, 0.8, 0.0),
 (6.0, 0.8, 0.0),
 (0.0, 1.8, 27.0),
 (0.5, 1.8, 25.0),
 (1.5, 1.8, 22.0),
 (2.5, 1.8, 22.0),
 (3.5, 1.8, 27.0),
 (5.0, 1.8, 38.0),
 (5.01, 1.8, 0.0),
 (6.0, 1.8, 0.0),
 (0.0, 2.8, 22.0),
 (0.5, 2.8, 20.0),
 (1.5, 2.8, 19.0),
 (2.5, 2.8, 22.0),
 (3.5, 2.8, 28.0),
 (5.0, 2.8, 42.0),
 (5.01, 2.8, 0.0),
 (6.0, 2.8, 0.0),
 (0.0, 3.8, 14.0),
 (0.5, 3.8, 12.0),
 (1.5, 3.8, 10.0),
 (2.5, 3.8, 13.0),
 (3.5, 3.8, 21.0),
 (5.0, 3.8, 39.0),
 (5.01, 3.8, 0.0)]
myLiPlo3d=list_plot3d(myMatrix,aspect_ratio=[1,1,0.02])
myLiPlo3dLi=list_plot3d(list(myMatrix),aspect_ratio=[1,1,0.02])
myPlo3d=point3d(myMatrix,size=20,aspect_ratio=[1,1,0.02])

Now

show(myPlo3d)

does result in the plot I'm looking for, except for the fact that it's just points and not a connected surface. However, both,

show(myLiPlo3dLi)
show(myLiPlo3d)

result in a totally different z-scale and shape.


Thinking as I'm editing: May this strange scaling be an artifact of perfect polynomial fitting? That's not what I'm looking for, I don't want any overswings (is that an English word?); I'd even be ok with bilinear interpolation.

2022-06-04 18:34:35 +0200 received badge  Scholar (source)
2022-06-04 18:34:32 +0200 commented answer Plot 3d data

The final solution is in Emmanuel's 3rd comment and the link there.

2022-06-04 18:34:10 +0200 commented answer Plot 3d data

The final solution is in Emmanuel's 3rd comment and his [link=https://sagecell.sagemath.org/?z=eJxt0kuugjAUgOG5q2icCLEhf

2022-06-04 18:33:39 +0200 commented answer Plot 3d data

The final solution is in Emmanuel's 3rd comment and his link

2022-06-04 18:30:46 +0200 commented question Plot 3d data

Awesome, your answer solves my problem as well as it teaches me two or three things about sagemath! Thanks a lot. I've

2022-06-03 22:24:56 +0200 edited question Plot 3d data

Plot 3d data I've been unable to find any viable solution although I'm quite sure there's an easy one. I'd like to plot

2022-06-03 22:23:51 +0200 edited question Plot 3d data

Plot 3d data I've been unable to find any viable solution although I'm quite sure there's an easy one. I'd like to plot

2022-05-13 10:12:32 +0200 received badge  Editor (source)
2022-05-13 10:12:32 +0200 edited question Plot 3d data

Plot 3d data I've been unable to find any viable solution although I'm quite sure there's an easy one. I'd like to plot

2022-05-10 13:33:11 +0200 asked a question Plot 3d data

Plot 3d data I've been unable to find any viable solution although I'm quite sure there's an easy one. I'd like to plot