Tag Info

New answers tagged

10

I believe you want "FrontFaceColor" which can be found as a specification in this list: Graphics[{FaceForm[RGBColor[2/3, 1/3, 2/3]], EdgeForm[Black], Dynamic[{If[CurrentValue["MouseOver"], Darker @ CurrentValue["FrontFaceColor"]], Disk[]}]}] You may also find "FrontFaceOpacity" of use. Simply guessing I found that "BackFaceColor" is also ...


2

It is always a pain to adjust everything in complex Manipulate but if you insist :) Manipulate[ {filter, list} , {{filter, 1, "Filter:"}, {1, 2, 3, 4, 5, 6}, ControlType -> PopupMenu} , {list, None} , Grid[{{"List:", PopupMenu[ Dynamic[list, If[# < filter, , list = #] &], # -> Dynamic[Style[#, If[# < filter, Gray, ...


1

It's a DynamicModule not a Manipulate, but it works (Mma V10.1 on Mac and Windows) DynamicModule[{filter, list = 1}, Column[{ PopupMenu[Dynamic[filter], Range[6]], PopupMenu[Dynamic[list], Table[With[{i = i}, (If[i < filter, list = list, list = i]) -> i], {i, 6}]], {"filter", Dynamic[filter]}, {"list", Dynamic[list]} }]] ...


0

I figure out myself, I'll just answer this now. To do this, you have to make a module, which allows you to bind multiple variables to one control parallelly: Manipulate[Module[{text, waveFunc}, text = Switch[f, 1, Style[" Long Radio Wave\n This is the Long Radio Wave\n It's wave length is between 10^2 to 10^8 meters", FontFamily -> "Arial", ...


6

There are some doubts about using SaveDefinitions (1), (2), so let's implement brute force approach which may be used later automaticaly. Scheme Needs @ yourPackage (*a*) CDFDeploy[...]& @ With[{ source = (text content of the package, encoded or whatever) (*b*) }, DynamicModule[{ ... }, ... , Initialization:>( Get[#]& @ ...


2

This should work as you expect: DynamicModule[{y}, CellPrint[ TextCell[Column@{Slider[Dynamic[y], {1, 10, 1}], Dynamic@y, Dynamic[imgs[[y]]]}, CellEventActions -> {"LeftArrowKeyDown" :> (y = Max[1, y - 1]; SelectionMove[InputNotebook[], After, ButtonCell]), "RightArrowKeyDown" :> (y = Min[10, y = y + 1]; ...


4

Let's give you some freedom of choice here and since you explicitly avoided Manipulate, let's start with this. The piece that creates the plot, the rectangle and the triangles will almost be the same in all three examples. In all three examples, I will use locators, that have no appearance but will be forced to stay on the y=0 line, so that they are always ...


2

This should do it. leftTriangle = Magnify[Graphics[{Directive[ColorData[1][1], Opacity[0.5]], Triangle[{{-1, 1}, {0, 0}, {-1, -1}}]}, AlignmentPoint -> Left], 0.1]; rightTriangle = Magnify[Graphics[{Directive[ColorData[1][1], Opacity[0.5]], Triangle[{{1, 1}, {0, 0}, {1, -1}}]}, AlignmentPoint -> Right], 0.1]; plot = Plot[Sin[x], {x, -Pi, ...


8

I think you are actually not doing anything wrong but have found one of those cases where the automatic dependency tracking doesn't work (I think this is a bug). You can make the code work (version 10.1 on Windows) by explicitly telling the last Dynamic to track choices: Dynamic[choices,TrackedSymbols:>{choices}] There are some things in your code ...


3

You can use IntervalSlider in version 10.0 and above. However, you need to explicitly tell Manipulate to use it. Manipulate[ fShowInterval[Sequence @@ probRange], {probRange, 2000, 4000, IntervalSlider, Method -> "Push", MinIntervalSize -> 1}, Initialization :> (probRange = {2500, 3500};)] Method -> "Push"will keep the interval ...


10

Just like Albert I recommend using the second argument of Dynamic. Furthermore I recommend that you embrace the first A in AJAX, which stands for "asynchronous", so the kernel isn't busy while it collects the data (this might be why some change events are lost with your code). You can see how well the second argument of Dynamic works with this example: ...


9

I think the standard way to do this is to use the second argument of Dynamic, e.g. like so: With[{ getCompletion = Function[ Import[ "https://maps.googleapis.com/maps/api/geocode/json", "JSON", "RequestParameters" -> {"address" -> #} ] //. {{r__Rule} :> (Association[r])} ]}, DynamicModule[{ addr = "555 Mission St, San ...


5

The first answer to the possible duplicate doesn't seem to work under version 10.1. Therefore here is some similar code, that does work: prjs = {prj1, prj2, prj3} = RandomReal[#, 100] & /@ {1, 2, 3}; Manipulate[ListPlot[prjs[[projectNo]], Joined -> True], {{projectNo, {1}}, Range[Length@prjs], ControlType -> CheckboxBar}]


0

I've done the change for the first set of variables... DynamicModule[{Q1 = 175000, Q2 = 175000, P1 = 3500, P2 = 3500, PW1 = 220, PW2 = 220}, CQ1 := 25* Q1*(1 + ((25*(273.15 + 25)/(273.15 + 25)) - 1)*(.2857142857*PW1*P1* Log[(10125 + P1)* Log[10]/(10125* Log[1 + .2857142857*PW1* P1*((10125 ...


0

These are just some tweaks of LLlAMnYP's approach, which I didn't read carefully enough at first to realize that the fundamental improvement, speeding up the integral, was similar in both cases; then I got curious because my locator-plot reacted faster even though my integral code evaluated slightly slower. The significant improvement is evaluating the ...


4

There are a couple of things wrong in your code: first you need to define the recursions consistently... here I've put all the t-terms on the left and t-1 on the right hand side. Next, you need to specify initial conditions (there weren't any for the fx and fy and the y was only defined implicitly (as 1-x). So here is syntactically correct code: d = 2; k = ...


4

The second argument to Dynamic is the key. The code does not keep track of ViewVertical, which will change as the graphics are rotated by the mouse. See the references at the end for some of the answers where I used this technique. Manipulate[ Framed[Graphics3D[{PolyhedronData["Dodecahedron", "Faces"]}, ViewPoint -> Dynamic[3.0 {Cos[θ] ...


2

It's hard to say much without details but let's try: globalVar = 0; DynamicModule[{ localVar = 0}, Column[{ Button["Stop", RemoveScheduledTask@ScheduledTasks[]], Dynamic@List@localVar }] , Initialization :> ( RunScheduledTask[ If[localVar != globalVar, localVar = globalVar; FinishDynamic[]], 1, 2 ] ) ] This is kind of ...



Top 50 recent answers are included