# Tag Info

72

For differentiation at least, old versions of Mathematica had a demonstration function called WalkD[] that holds your hand and shows what is done at each stage up until the final answer. In general, however... You should realize at the outset that while knowing about the internals of Mathematica may be of intellectual interest, it is usually much ...

34

Date-picker implementation in Mathematica The following is my implementation of a simple date-picker. The current date is highlighted in LightBlue and the weekends are highlighted in LightGreen. The selected date is always highlighted in LightRed (the default selection is the current date). You can tap into this calendar by using the Dynamic values for ...

21

If you are serious about using this extensively, consider making a function based on CreateDocument... Here is one way to pursue Szabolcs's line of thought. What follows is a function based on CreateDocument[] that can be used in conjunction with the (now somewhat neglected) option DisplayFunction, which handles where the output of graphics functions ...

18

ListPlot accepts data wrappers besides Tooltip (although I could not find any mention of this feature in the docs). So, @Jens' method can be achieved without post-processing: data = Table[{Sin[n], Sin[2 n]}, {n, 50}]; ListPlot[PopupWindow[Tooltip[#], #] & /@ data] On mouseover: Click on a point: Note: Thought this was a new feature added ...

18

To see the steps for taking indefinite integrals one can use free rule-based integrator nicknamed Rubi crafted by Albert D. Rich: Click on the sample integration problem at the end of the notebook and press Shift-Enter to evaluate it. After a minute or so depending on the speed of your computer, the first step of the integration should be displayed....

17

You can always create a new notebook and put things in it. If you are serious about using this extensively, consider making a function based on CreateDocument that sets the appropriate options for the notebook to look good. Check what CreateDocument@Plot[Sin[x],{x,0,10}] does. Or use a quick-and-dirty hack based on CreatePalette: fig = CreatePalette[#, ...

16

Perhaps there are better ways, but one I am aware of is by using CellEvaluationFunction option for a given cell. Here is code to generate some example cell with the behavior similar to what you presumably desire: CellPrint[ Cell[BoxData[RowBox[{"100", "!"}]], "Input", CellEvaluationFunction -> (Module[{res = ChoiceDialog["Evaluate this ...

16

You can install the LiveWeb plugin for PowerPoint which allows to embed a live webpage into a slide. Now you should prepare an HTML page with emdedded CDF object (here and here you can find old instructions how to do this, but probably there is easier way now) and embed it into a PowerPoint slide. People say that it works surprisingly well and you maintain ...

14

This? {Slider[Dynamic[x], {0, 10}], Slider[Dynamic[2 x, Set[x, #/2] &], {0, 20}]} The documentation explains, under More Information, that "Dynamic[expr,f] makes interactive operations not change expr except by virtue of the evaluation of f[val,expr]. ". Otherwise, Mathematica attempts to assign a value to 2x.

13

here is a function based on WolframAlpha[] ShowSteps[exp_] := WolframAlpha[ ToString@HoldForm@InputForm@exp, {{"Input", 2}, "Content"}, PodStates -> {"Input__Show steps"}] SetAttributes[ShowSteps, HoldAllComplete] for limits use PodStates -> {"Limit__Show steps"} for integration PodStates -> {"IndefiniteIntegral__Show steps"} ...

13

There is a built-in DateSetter: {DeveloperDateSetter[Dynamic@date], Dynamic@date} By default the first selectable date is tomorrow and one can only go to future months. However, the option NotebookToolsDateSetterRange can be used to set the first selectable date to sometime in the past, {DeveloperDateSetter[Dynamic@date, NotebookTools...

11

Here is one that should work in version 6 and later. The full code is at bottom. Here is what it looks like: {dateSetter[Dynamic[d]],Dynamic[d]} I did not incorporate the year here, but you could put it in a Tooltip or add it to the button's graphic. And when you click on the button you get Incorporate this into a Manipulate using {d,dateSetter[#]&...

10

The answer by Mr. Wizard covers the built-in options, but one thing that you may be missing is that the tooltip alone isn't very convenient when it comes to recording the desired coordinates for later use. You'd have to read off the numbers and type them in again. If you want to automate this process too, then you might be interested in the following: data ...

10

I have improved J. M.'s version of walkD by adding error handling. I have also added walkInt that works like walkD except for integration. Code: Format[d[f_, x_], TraditionalForm] := Module[{paren, boxes}, paren = MatchQ[f,Plus[_,__]]; boxes = RowBox[{f}]; If[paren, boxes = RowBox[{"(", boxes, ")"}] ]; boxes = RowBox[{FractionBox[...

10

You can't. You can combine CDFs and content generated by other tools on web pages, though. From Frequently Asked Questions about the Computable Document Format (CDF) (Wolfram Research): Do CDFs plug in to Microsoft Office documents or PDFs? Currently, the CDF Player plugin only supports web browsers. We are exploring the same capabilities for a ...

9

That is the default (and expected) behaviour of LocatorPane. This is useful in implementing things like colour pickers, for example, where it is convenient to simply click on any point to select that colour and have the locator move there automatically to indicate selection. To create locators that move only when explicitly clicked and dragged, use a ...

9

You could do something like this DynamicModule[{range, ref, range0, fac = 2/3}, range = range0 = 2 {{-1, 1}, {-1, 1}}; EventHandler[ Dynamic@Graphics[{Disk[]}, Axes -> True, PlotRange -> range], {"MouseDown" :> (ref = MousePosition["GraphicsImageScaled"]; range0 = range), "MouseDragged" :> (range = range0 + (ref - MousePosition["...

8

For similar purposes using Button can be useful (in a non-sequential way): images = ExampleData["TestImage"][[1 ;; 8]]; choice = ExampleData /@ images; mods = ImageEffect[#, {"MotionBlur", 15}] & /@ choice; buttons = Button[Grid[{{"Export: " <> #[[1]]}, {Tooltip[#[[2]], HoldForm[Export @@ #]]}}], Export @@ #] & /@ MapIndexed[{...

8

Inspired by Jens' answer, here is a method that will print below the plot the coordinates of each point clicked. printTip = Button[Tooltip@##, SelectionMove[ButtonNotebook[], After, Cell]; NotebookWrite[ButtonNotebook[], ToBoxes@#2], Appearance -> "Frameless"] &; data = N @ Table[{Sin[n], Sin[2 n]}, {n, 50}]; ListPlot[Tooltip @ ...

6

Wrap the output of the CDF (the Plot command in your case) into Deploy, or add the Deployed -> True option to your Manipulate. Using the Deployed option however does not solve all the problems. The documentation states, that Deployed -> True disables: ...general editing and selection in a cell General editing/selection means that in the ...

6

I expanded the answer by @Leonid to restore the previous result if you cancel the evaluation and packaged the functionality into a cell style in my stylesheet for convenience. The cell expression for the stylesheet is pasted below. This works in the cases I use often, but it has not been extensively tested. For example, it will not restore output in cases ...

6

A simple way to do this is to change the Dynamic so that it updates only the points you want to be editable. Here is a very simple demonstration pts = {{6, 0}, {0, 9}, {3, 0}, {0, 7}}; updatable = Range@Length@pts; Button["Fixate point 3", (updatable = {1, 2, 4})] LocatorPane[Dynamic[pts, (pts[[updatable]] = #[[updatable]]) &], Dynamic@Graphics[...

6

This is a basic code to get textures and "click on any face to show message" features: Graphics3D[{ {Texture[ExampleData[{"ColorTexture", "Metal4"}]], PopupWindow[ Polygon[{{-1, -1, 0}, {1, -1, 0}, {1, 1, 0}, {-1, 1, 0}}, VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}], Style["metallic floor", 18]]}, {Texture[...

6

Following suggestions in the comments, here is a way to achieve what I want: Manipulate[ Row[{ Plot[Sin[x (1 + a x)], {x, 0, 6}], Plot[Evaluate@D[Sin[x (1 + a x)], x], {x, 0, 6}]}, BaseStyle -> ImageSizeMultipliers -> 2/3], {a, 0, 2, Grid[{{ Slider[##, Appearance -> Tiny], InputField[#, FieldSize -> ...

6

Here is a simple way to convert any ListPlot into something that raises a PopupWindow, and it gives you feedback about the active point before clicking it, by showing a Tooltip: popupGraph[pt_] := Graphics[Circle[pt, .1], PlotRange -> {{0, 4}, {0, 4}}, Frame -> True] toolRule = Tooltip[x__] :> PopupWindow[Tooltip[x], popupGraph@Last@{x}]; ...

5

Since it appears that you wish to use live input for your Timeline, webMathematica will be the best solution. CDF cannot accept anything but input from what is in the file itself. Documentation can be found here: http://www.wolfram.com/products/webmathematica/ User Guide is located here: http://reference.wolfram.com/mathematica/webMathematica/tutorial/...

5

Manipulate[x = ConstantArray[0, 9 {1, 1}]; Row[{EventHandler[Dynamic[tds = Reverse[Transpose[x]]; MatrixPlot[tds, PlotRangePadding -> 0, Mesh -> All, ImageSize -> {300, 300}, ColorRules -> {1 -> Black, 0 -> None}]], {"MouseClicked" :> (pos = Ceiling[MousePosition["Graphics"]]; x = ReplacePart[...

5

Build in interface Undocumented and I don't know how to fully customize it but it seems it is something you're looking for: TableView[RandomChoice[{0, 1}, {10, 10}]] rubenko deliverd it here with a link to some info. As Jens have noticed it is not so great but You have to judge it by yourself. Custom interface If you do not need to have fully ...

5

From the documentation: Manipulate[operator[x, y], {{x, 2}, InputField}, {{y, 2}, InputField}, {operator, {Plus, Times, Subtract, Divide}}, SaveDefinitions -> True]

Only top voted, non community-wiki answers of a minimum length are eligible