Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Slow Refresh of Dynamic Tooltip with ListDensityPlot
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Brendan Godfrey

Posts: 4
Registered: 12/3/12
Slow Refresh of Dynamic Tooltip with ListDensityPlot
Posted: Dec 27, 2012 5:03 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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.




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.