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$
1
  • 2
    $\begingroup$ RegionFunction should be useful for cutting off unwanted sections. $\endgroup$ Oct 17, 2015 at 16:06

1 Answer 1

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$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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