0
$\begingroup$

I want to use SliceVectorPlot3D for visualization, but it always returns an empty plot. I have been trying to run several of the examples from the documentation, like

SliceVectorPlot3D[{y, -x, z}, "CenterPlanes", {x, -2, 2}, {y, -2, 2}, {z, -2, 2}]

but none of them work for me. I am running Mathematica 12.2.0 on Arch Linux. It does not work on a Windows virtual machine either. I have confirmed it to be working on my Windows desktop, however. I noticed that ListSliceVectorPlot3D does not work for me either, but SliceDensityPlot3D does, for some reason.

I have not found out about any issues with SliceVectorPlot3D online.

Does anyone have an idea what could be the cause of this?

$\endgroup$
7
  • $\begingroup$ "different versions of Mathematica" - but which version numbers? $\endgroup$ – J. M.'s ennui Feb 14 at 20:56
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Michael E2 Feb 14 at 23:43
  • $\begingroup$ @J.M. I edited my post and added the version numbers. $\endgroup$ – Yousousen Feb 15 at 5:50
  • $\begingroup$ I can not reproduce your problem in V12.1.1 running on MacOS. $\endgroup$ – m_goldberg Feb 15 at 16:41
  • $\begingroup$ Works ok on ver 12.0.0.0 in Windows. Also, try either saving and restarting the notebook or clearing all variables using Clear["Global`*"] then running the code again. $\endgroup$ – Dominic Feb 15 at 19:01
1
$\begingroup$

Test the following method.

Style[SliceVectorPlot3D[{y, -x, z}, 
  "CenterPlanes", {x, -2, 2}, {y, -2, 2}, {z, -2, 2}], 
 RenderingOptions -> {"3DRenderingEngine" -> "Mesa"}]
Style[SliceVectorPlot3D[{y, -x, z}, 
  "CenterPlanes", {x, -2, 2}, {y, -2, 2}, {z, -2, 2}], 
 RenderingOptions -> {"3DRenderingMethod" -> "BSPTree"}]

If one of above work,you can go to the setting of Mathematica by

Format -> Option Inspector -> Selection -> Global Preferences -> Lookup

and search 3DRenderingEngine then select Mesa.

$\endgroup$
1
  • $\begingroup$ Wow, thank you so much! Both of those make me able to render the graph as expected. $\endgroup$ – Yousousen Feb 16 at 6:56

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.