
Slow Refresh of Dynamic Tooltip with ListDensityPlot
Posted:
Dec 27, 2012 5:03 AM


I am obtaining the values of array elements and related information using Tooltip with a ListDensityPlot. The cell instruction is
Dynamic[Tooltip[Show[ListDensityPlot[aa, DataRange > {{0, Pi/x0}, {0, Pi/z0}}, PlotRange > All, ColorFunction > "Rainbow", PerformanceGoal > "Quality", Frame > False, PlotLegends > BarLegend[Automatic, LegendMarkerSize > 400]], Plot[Evaluate[Table[Sqrt[Mod[(kz + m*2*(Pi/\[CapitalDelta]z0))*vz0, 2*(Pi/t0), l*(Pi/t0)]^2  kz^2], {m, mmin, mmax}, {l, 15, 15, 2}]], {kz, 0, Pi/z0}, PlotRange > {0, Pi/x0}, PlotStyle > Black, PerformanceGoal > "Quality"]], p = IntegerPart[(Pi/z0)*MousePosition["Graphics", {0, 0}] + {0.5, 0.5}]; Refresh[p, TrackedSymbols > p]; {aa[[p[[2]],p[[1]]]], p[[1]], p[[2]], (p[[1]]  1)*(Pi/((nz  1)*z0)), (p[[2]]  1)*(Pi/((nx  1)*x0))}]]
where aa is a real 65x65 array and all other variables not defined in the cell are real constants.
I would expect Mathematical to respond nearly instantly as the mouse pointer is moved, because only p and the Tooltip output need to be recalculated. In fact, it takes a few seconds for the Tooltip display to change. Moreover, the whole program has become more sluggish, and even the Mathematica Help Files now respond slowly when the program containing this cell is open. What can I do to fix this. Thanks.

