Tag Info

Hot answers tagged

16

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 ...


14

My variant is without tooltips but is fast. You need to click on the desired cell to get the value. One more advantage is that you have the generic MatrixPlot, not a substitute. A = Table[Sin[x y/10 + x], {x, 1, 50}, {y, 1, 50}] // N; {n, m} = Dimensions@A; DynamicModule[{pt = {1, 1}/2, trans, ij}, trans[{x_, y_}] := {Max[1, Min[n, Floor[n - y] + 1]], ...


12

Actually, as we can use Tooltip on elements directly this is a cleaner method: label = Tooltip[{##2}, Grid[{ {"Name", #}, {"Usability ", #2}, {"Relevancy", #3}, {"Market Size", #4} }, Frame -> All, Alignment -> Left ]] &; BubbleChart[ label @@@ data3, ChartStyle -> 24 ] How about this? ...


10

This is just an elaboration of faleichik's answer. To create a MatrixPlot with tooltip labelling and highlighting of the selected square similar to for example BarChart or BubbleChart you could do something like matPlot[mat_, opts : OptionsPattern[]] := With[{dim = Dimensions[mat]}, DynamicModule[{pt = {0, 0}, ij, xy, label, direction}, direction = 1 ...


10

Improvised Tooltip using Text and Mouseover Here's one way to improvise a tooltip for graphics objects--in this case, a list of points. It emulates a tooltip but does not leave a a drop shadow, and as István notes, has a few graphical shortcomings that make it less than ideal (clipping, under axes layer). Also, the code would need to be tweaked for objects ...


8

My colleague John Fultz suggested the following answer. f /: MakeBoxes[dat : f[args_], fmt_] := TagBox[ToBoxes[Rasterize@RandomImage[1, {100, 100}]], InterpretTemplate[f[args] &], Editable -> False, Selectable -> True, SelectWithContents -> True, Tooltip -> "tooltip"] After a bit of exploring I realized that I should have checked ...


8

You can also explicitly label using VertexLabels and use Tooltip as the positioning: Graph[{1 -> 2, 1 -> 3, 1 -> 4, 1 -> 5}, VertexLabels -> {5 -> Placed["five", Tooltip]}, ImagePadding -> 20]


8

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 ...


7

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

Show[ ListPlot3D[correlationMatrix, AxesStyle -> Thickness[0.01], AxesLabel -> {"X", "Y", "Corr(X,Y)"}, AxesEdge -> {{-1, -1}, {-1, -1}, {-1, -1}}, ColorFunction -> "BrightBands"], ListPointPlot3D @ Tooltip @ Flatten[ MapIndexed[Flatten@{#2, #1} &, correlationMatrix, {2}], 1] ]


6

One can also use the option CoordinatesToolOptions for MatrixPlot and make use of the Get Coordinates tool as follows: MatrixPlot[mat, ColorFunction -> "DeepSeaColors", CoordinatesToolOptions -> {"DisplayFunction" -> Function[pt, With[{rows = Dimensions[mat][[1]], columns = Dimensions[mat][[2]]}, indices = {Clip[Floor[rows - pt[[2]]] + 1, ...


6

EDIT: y-axis corrected You could do something like this: a = RandomInteger[99, {7, 5}]; minmax = {Min@a, Max@a}; cf = ColorData["SunsetColors"]; ticks = Table[{i, # - i + 1}, {i, #}] & @ Length[a] Graphics[ {cf[1 - Rescale[#2, minmax]], Tooltip[Rectangle[# - 0.5], #2]} & @@@ Most @ ArrayRules @ Reverse[a\[Transpose], {2}], Frame -> ...


6

I tracked this down a few years ago. Around version 6 or 7 I was writing a function to put a legend on a plot based on the Tooltip wrapped around each data set. It worked on all plots except ListPlot. Back then some of the graphing functions were in an external package instead of built-in, so I could open the package and look at the code. Apparently, for ...


5

What you need is: DisplayData20YrNoScientific = Map[Tooltip[#, NumberForm[N[#], ExponentFunction -> (Null &)]] &, DisplayData20Yr] So check that the tooltip works ok on the data: Then plot it: ListLinePlot[DisplayData20YrNoScientific, Joined -> True, PlotMarkers -> {Automatic, 12}] Edit Forgot to mention that your original ...


5

data = { {2776.37, 2016.64, 1483.51, 1027.35, 500.878, 94.1385, 310.402, 282.548, 257.886, 224.359, 218.688, 209.312, 215.776, 198.78}, {40.5063, 24.633, 12.069, 8.3151, 6.35135, 15.0977, 8.74372, 15.5125, 9.34959, 9.70696, 11.125, 12.1457, 10.8075, 9.7561}, {113.08, 124.633, 75.9698, 59.5186, 55.9459, 7.81528, 57.4372, ...


4

One way to do this: is = 150; rm = RandomInteger[100, {5, 5}]; m = Map[Tooltip[#, #] &, rm, {2}]; A = GraphicsGrid[m, ImageSize -> is {1, 1}]; B = MatrixPlot[rm, FrameTicks -> None, Mesh -> All, PlotRangePadding -> 0, ImageSize -> is {1, 1}]; Overlay[{A, B}, All, 1] It'll be a bit more elaborate to add frame ticks.


3

Well I just used your previous question to get this working. You cannot just wrap evrything in ToolTip - you need to wrap each data set in it with its specific label: ListLogPlot[ MapThread[ Tooltip, {data, Style[#, 15, Bold, FontFamily -> "Georgia"] & /@ {"Sample X", "Sample Y", "Sample Z"}}], Joined -> True, Ticks -> ...


3

EDIT As rasher observes my answer does not answer your direct question. Tooltip wrapper does not appear to work for ListPicker items. I posted this answer in the event it achieves your aim or motivates your own answer. I am not certain what your ultimate aim is. I have modified your code (esp. avoid uppercase variable names to avoid conflicts with ...


3

String manipulation like in jVincent's answer is nice, but I normally prefer to combine these types of elements using Row: Manipulate[ Plot[Tooltip[Sin[k x], Row[{"Sine Curve, k=", k}]], {x, 0, 4 Pi}], {k, 1, 5}] For more complicated objects, it just normally ends up being neater. Maybe my preference comes from having to work with RowBox and ...


2

With[{ top = 0.5 RandomReal[{0, 1}, 100] + Table[Sin[0.0628 i], {i, 100}], bot = 0.5 RandomReal[{0, 1}, 100] + Table[Cos[0.0628 i], {i, 100}], opts = {Joined -> True, ImageSize -> 400} }, With[{epi = Function[{}, With[ {mouse = MousePosition[{"Graphics", Graphics}, {99999, 99999}]}, Text[Style[Framed[Column[{ ...


2

In version 7 this suppresses the Show Animation Controls tooltip but fails to suppress the Play, Step Forward etc. ones. Style[ Manipulate[Plot[Sin[x (1 + a x)], {x, 0, 6}], {a, 0, 2}], TooltipBoxOptions -> {DefaultLabelStyle -> {Opacity[0], 0}} ]


2

Add to your ListPlot the following option: PerformanceGoal -> "Give me the tooltips!" and you'll have them. Another way is to use the option: Method -> {"If tooltips are lost", "Find them and plot them"} If you're not comfortable with these commands, use more mathematical InterpolationOrder -> 1


1

Trying to modify your code as little as possible: {Labels, BlockData} = Map[("LabeledData" /. data) /. Rule[a_, b_] :> # &, {a, b}]; ColorBy = "AREA"; Data4Color = ColorBy /. ("LabeledData" /. data); Geometry = "Geometry" /. data; labeled = {Data4Color, Geometry, Transpose@BlockData}\[Transpose]; gathered = GatherBy[labeled, First@# &]; h1 = ...


1

You can proceed with ReplaceAll: ContourPlot[Sqrt[(x - 2)^2 + (y - 2)^2 - 5], {x, -15, 15}, {y, -15, 15}, Contours -> {4} ] /. _Polygon -> Sequence[] /. Tooltip[x_, y_] :> Tooltip[x, "example"] In case of many contours you can take control this way: ContourPlot[Sqrt[(x - 2)^2 + (y - 2)^2 - 5], {x, -15, 15}, {y, -15, 15}, ...


1

Part of the code taken from the question posted by @Cormullion crimestats = WolframAlpha[ "Murder rate by state", {{"PropertyRanking:CrimeData", 1}, "ComputableData"}]; crimestats = MapThread[Rule, {crimestats[[All, 2]], #[[1]] & /@ crimestats[[All, 3]]}]; usa = ...


1

Some time ago I wanted to have good tooltips for images composed by polygons. Mathematica generated square areas only, and the polygons had many shapes. Then I did my own export function for polygons with tooltips. I basicaly rescaled all the polygon points to the image size and wrote the image maps. I never found how to get the right area from Mathematica. ...



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