1
$\begingroup$

I am trying to visualize a few 2D arrays in ArraryPlot3D. I think I have made it work, however, there is a minor detail on the mesh of the plot I want to improve. For example, this is what the current 3d plot looks like: sample 3D plot

However, if you look closely at the details of the edge, you will see there is a tiny tail, which I want to remove. I wonder if there is a easy way to achieve this? I notice that this effect is not prominent when the Mesh thickness is small.

tl;dr: I want to remove this tiny tail enter image description here in ArrayPlot3D when the mesh thickness is large.

Here I attach the sample code:

blank = ConstantArray[0, {10, 10}];

block = ConstantArray[1, {10, 10}];

ArrayPlot3D[{block, blank, blank, block, blank, blank, block, blank, 
  blank, block}, 
 MeshStyle -> Directive[AbsoluteThickness[2.5], Black], 
 ImageSize -> 1200]
$\endgroup$
4

2 Answers 2

2
$\begingroup$

Add an option, BaseStyle->RenderingOptions->{"3DRenderingMethod"->"BSPTree"}

blank=ConstantArray[0,{10,10}];
block=ConstantArray[1,{10,10}];

ArrayPlot3D[{block,blank,blank,block,blank,blank,block,blank,blank,block},
  MeshStyle->Directive[AbsoluteThickness[2.5],Black],ImageSize->1200,
  BaseStyle->RenderingOptions->{"3DRenderingMethod"->"BSPTree"}]

enter image description here

$\endgroup$
0
$\begingroup$
blank = ConstantArray[0, {10, 10}];
block = ConstantArray[1, {10, 10}];

ArrayPlot3D[{
  block, blank, blank, block, blank, blank,
  block, blank, blank, block},
 MeshStyle ->
  Directive[AbsoluteThickness[2.5], Black],
 ImageSize -> 1200,
 Method -> "ArrayMesh"]

enter image description here

$\endgroup$
5
  • 1
    $\begingroup$ Still have the same issue. I will try on my Windows machine to see if this is OS-related. $\endgroup$
    – Ycl_Phy
    Mar 15, 2022 at 23:35
  • $\begingroup$ I used "13.0.1 for Mac OS X x86 (64-bit) (January 28, 2022)" $\endgroup$
    – Bob Hanlon
    Mar 15, 2022 at 23:37
  • $\begingroup$ MacOS 12.3.1 and Win10 12.2.0 have the same effect. Upgrading Mathematica now to see if I can get it working. $\endgroup$
    – Ycl_Phy
    Mar 15, 2022 at 23:41
  • $\begingroup$ Just tried "13.0.1 for Mac OS X ARM (64-bit) (January 28, 2022)" still not working, let me try Windows version... $\endgroup$
    – Ycl_Phy
    Mar 15, 2022 at 23:52
  • 2
    $\begingroup$ 13.0.1 for Microsoft Windows (64-bit) (January 28, 2022) also doesn't work... $\endgroup$
    – Ycl_Phy
    Mar 16, 2022 at 0:11

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.