# Compatibility issues with an old package

I am trying to use the SphericalDensityPlot3D function that is defined here: Spherical Density Plot 3D. However, when I run all the contents of the mathematica package (".m") file, I get the following errors:

Get::noopen: Cannot open UtilitiesFilterOptions.

Needs::nocont: Context UtilitiesFilterOptions was not created when Needs was evaluated.

This happens when the following cell is evaluated:

Needs["UtilitiesFilterOptions"]


The last revision for this package is from 2001 and so I assume there are is some compatibility issue, since I am running version 11.2. So, does anyone know how I could fix this problem?

Thanks!

The FilterOptions issue has been discussed in a number of posts, you can simply modify the line

Needs["UtilitiesFilterOptions"]


to

If[\$VersionNumber >= 9,
FilterOptions[a_,b___] := Sequence @@ FilterRules[{b}, Options[a]],
Needs["UtilitiesFilterOptions"]]


This isn't the end. Though I can't figure out what exactly they are, the package has made use of some outdated features of Graphics3D, so to get the desired result, you need to execute

<< Version5Graphics


first:

But, since you're in v11.2, why not turn to SliceDensityPlot3D? You just need to transform the coordinate first:

expr = TransformedField[ "Spherical" -> "Cartesian",
Re[SphericalHarmonicY[4, 2, th, ph]], {r, th, ph} -> {x, y, z}];

SliceDensityPlot3D[expr, "CenterSphere", {x, y, z} ∈ Ball[],
PlotLegends -> Automatic]


BTW, for those before v10.2, I think the solutions in this post are better alternatives compared to this package.