0
$\begingroup$

Consider the following .wl package:

BeginPackage["ColorsIn3DPlot`"]; Begin["MyPrivate`"] CreatePalette[Manipulate[ Plot3D[Sin[x y], {x, 0, 3}, {y, 0, 3}, ColorFunction -> color, ImageSize -> {480, 480}], {color, {"Rainbow", "NeonColors", "BlueGreenYellow"}}], WindowFloating -> True, WindowSize -> All, WindowTitle -> "Nice Plot", Saveable -> False]; End[]; EndPackage[]; 

Clicking on ► Run All Code at the top right corner of the so-called "Package Helper" indeed outputs a palette with the 3D graphics, but no interactivity is enabled.

Can anyone point out the reason to why it is so?

$\endgroup$
4
  • $\begingroup$ What version are you using? $\endgroup$ Commented Jul 25, 2021 at 16:56
  • $\begingroup$ Version 12.0 on windowd 10. $\endgroup$ Commented Jul 25, 2021 at 17:05
  • $\begingroup$ Just tried it once again on Mac OS X, running version 12.2, and still, no 3d interactivity is there. $\endgroup$ Commented Jul 25, 2021 at 17:17
  • $\begingroup$ What seems to help is adding the option StyleDefinitions -> "" to CreatePalette, therefore a problem lies in the defaulty Palette.nb style. However, this makes the palette window include the top Wolfram Mathematica bar. $\endgroup$ Commented Jul 25, 2021 at 17:23

1 Answer 1

2
$\begingroup$

Add WindowClickSelect -> True to CreatePalette.

CreatePalette[ Manipulate[ Plot3D[Sin[x y], {x, 0, 3}, {y, 0, 3}, ColorFunction -> color, ImageSize -> {480, 480}], {color, {"Rainbow", "NeonColors", "BlueGreenYellow"}}], WindowFloating -> True, WindowSize -> All, WindowTitle -> "Nice Plot", WindowClickSelect -> True, Saveable -> False]; 
$\endgroup$
1
  • $\begingroup$ Thanks a lot! So it is not related in any way to the package file. I should change the question title then. $\endgroup$ Commented Jul 25, 2021 at 20:45

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.