1
$\begingroup$

Problem

I have an array defined as arr1 = {{0, 0, 0}, {0.6, 0, 0}, {0, 0.4, 0}, {0.6, 0.4, 0}, {1, 0.4, 0}, {0, 1, 0}, {0.6, 1, 0}, {1, 1, 0}}.

I'd like plot somethig like this:

enter image description here

However, with plt1 = ListPlot3D[arr1, PlotStyle -> {Opacity[0.5]}, Mesh -> None, AxesLabel -> {x, y, z}],I just got this:

enter image description here

My Question

I want to know how I can get a plot with a square corner ?

$\endgroup$
  • 2
    $\begingroup$ RegionFunction should be useful for cutting off unwanted sections. $\endgroup$ – J. M. will be back soon Oct 17 '15 at 16:06
6
$\begingroup$

@ J.M. I work out my problem with:

plt1 = ListPlot3D[arr1, RegionFunction -> Function[{x, y}, ¬ (x >= 0.6 ∧ y <= 0.4)], PlotStyle -> {Opacity[0.5]}, Mesh -> None, AxesLabel -> {x, y, z}]

Thanks.

the plot

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.