Tag Info

New answers tagged

2

You just need to put in conditions that test whether the point crosses the curve. You'll need to keep track of the previous position. You'll also need to decide what constitutes a crossing. The simplest is that it changes sides (as indicated by the y coordinate) when the x coordinates of the point and the previous point are within the plot's domain (for ...


1

Perhaps I'm missing something, but can't this problem be solved without the event handling? Manipulate[ LogPlot[Log[T], {T, 273.16, 647.096}, PlotStyle -> Thick, Epilog -> Inset[Style[Text[If[Exp@Last@l > Log[First@l], "Vapor", "Liquid"]], 16, Bold], l, Scaled[{-.5, 1}]]], {{l, {450, Log[5.6]}}, Locator}] I'll edit to include ...


1

From tutorial/InteractiveGraphicsPalette you can see that quite a few of the lowercase keys are used by DrawingTools which becomes active once the cursor focus is on the graphics. So, the easiest work-around is to use uppercase letters in your EventHandler as suggested by pjc42. When the first argument of EventHandler does not contain a graphics object, ...


1

another idea but not an answer... DynamicModule[{keyList = {}, pts = {}, input = Null}, EventHandler[ {LocatorPane[Dynamic[pts], Graphics[Circle[], ImageSize -> 500], LocatorAutoCreate -> True, Appearance -> {Graphics[{Red, Disk[]}, ImageSize -> 10], Graphics[{Blue, Disk[]}, ImageSize -> 10]} (*LocatorPane**)], ...


1

This is only a partial answer but may help. See here for related case, it is probable that KeyDown "a" is reserved like "c". This does not work: DynamicModule[{someList = {}}, EventHandler[Graphics[{Blue, Disk[]}, ImageSize -> 100], {{"KeyDown", "a"} :> (AppendTo[someList, 1]; Print[someList])}]] (** doesn't work **) But changing "a" to ...



Top 50 recent answers are included