Group Abstract Group Abstract

Message Boards Message Boards

0
|
1.7K Views
|
2 Replies
|
1 Total Like
View groups...
Share
Share this post:

How to combine plot with dynamic graphic?

Posted 1 year ago

I have a heat map that I'd like to combine with an overlaying dynamic graphic (see attached notebook). I can't figure out how to do this despite much googling and puttering. I'm sure I don't understand the nuances of dynamic modules and how they interact with graphics sufficiently. Advice?

POSTED BY: Todd Pytel
2 Replies

Have you tried Show?

dp = DensityPlot[a r + b, {x, y} \[Element] Disk[], Frame -> False];
DynamicModule[{pt = {0.5, 0}},
 Show[dp,
  Graphics[{
    {Thick, Circle[]},
    Line[{{0, 0}, Dynamic[pt]}],
    Locator[Dynamic[pt, (pt = constrain[#]) &], None],
    {EdgeForm[Thin], Opacity[0.05],
     Disk[{0, 0}, Dynamic[pt[[1]]]]},
    {PointSize -> 0.018, Point[Dynamic[pt]]}},
   PlotRange -> 1.1]]]

The Dynamic stuff does not work.

POSTED BY: Gianluca Gorni
Posted 1 year ago
POSTED BY: Todd Pytel
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard