# Tag Info

32

You could turn the dimensioning into a handy function: ClearAll@dim; dim[{a_, b_}, label_String, d_] := Module[{n = Normalize[RotationTransform[π/2][b - a]], t = Arg[(b - a).{1, I}], r}, If[t > π/2, t -= π]; { Arrowheads[{-0.04, 0.04}], Arrow[{a + d n, b + d n}], Line[{a + 0.1 d n, a + d n}], Line[{b + 0.1 d n, b + d n}], ...

31

GraphicsRow takes a PlotLabel option: p1 = Plot[Sin[x], {x, 0, Pi}, PlotLabel -> Sin]; p2 = Plot[Cos[x], {x, 0, Pi}, PlotLabel -> Cos]; GraphicsRow[{p1, p2}, PlotLabel -> "Two plots"]

29

vertices = {"rush hour", "bad weather", "accident", "traffic jam", "sirens"}; edges = DirectedEdge @@@ {"rush hour" -> "traffic jam", "bad weather" -> "accident", "accident" -> "traffic jam", "bad weather" -> "traffic jam", "accident" -> "sirens"}; edgelabels = RandomWord["Noun", Length @ edges]; Graph[edges, PlotTheme -> ...

21

Update 3: Styling and labeling edges individually can now be more conveniently done using new-in-version-12.1 function EdgeTaggedGraph: labels = {"A", "B", "C", "D", "E", "F"}; edges = {a -> b, a -> b, a -> b, a -> b, a -> e, e -> b}; styles = ColorData[97] /@ Range[6]; ...

20

It's a fussy solution, but it works. edges = {{0 -> "Mr 1", 1/10}, {0 -> "Mr 2", 2/10}, {0 -> "Mr 3", 3/10}, {0 -> "Mr 4", 4/10}, {"Mr 1" -> "A1", 2/10}, {"Mr 1" -> "B1", 1/10}, {"Mr 1" -> "C1", 7/10}, {"Mr 2" -> "A2", 3/10}, {"Mr 2" -> "B2", 2/10}, {"Mr 2" -> "C2", 5/10}, {"Mr 3" -> "A3", 4/10}, {"...

19

Update: functions to generate the edge list, indices and labels: ClearAll[layersF, edgesF, subscF, indicesF]; layersF = Module[{k = 1}, Table[k++, {i, #}, {j, i}]] &; edgesF = Flatten[Thread /@ Thread[# -> Partition[#2, 2, 1]] & @@@ Partition[layersF[#], 2, 1], 2] &; indicesF = Reverse[Thread /@ Thread[{...

18

r = 1; (*radius of each disk*) (*center of each disk. Numbers left to right, top to bottom*) c1 = {0, 0}; c2 = {r + 2, 0}; c3 = {r + 5, 0}; c4 = {r + 2, -(r + 2)}; c5 = {r + 5, -(r + 2)}; makeDisk[r_, c_] := {EdgeForm[Black],LightYellow, Disk[c, r]}(*change as needed*) makeArrow[from_, to_, dir_] := Module[{z = Cos[Pi/4]}, Which[ dir == "right", ...

18

Plot is returning a Graphics object, with the label specified in its Options. Retrieve the options with In[2]:= Options[plotwithLabel, PlotLabel] Out[2]= {PlotLabel -> "This is Label"}

18

We can use TreePlot (GraphComputation`TreePlotLegacy in versions 12.0+) with the hidden option "VertexNames" to label vertices with arbitrary labels. We need a function to post-process TreePlot output to fix the default orientation of edge labels: ClearAll[modifyArrowheads] modifyArrowheads[dir_: Automatic] := ReplaceAll[Inset[a_, b__, None, c___] :> ...

17

Labeled[Plot[Sinc[x], {x, 0, 9}], Style["plot label", "Section"], {{Top, Left}}] Also Panel[Plot[Sinc[x], {x, 0, 9}], Style["plot label", "Section"], {{Top, Left}}, Appearance -> "Frameless"]

17

Update 3: The issue mentioned in update 2 below is fixed in version 12.0. Update 2: In version 11.1, the option setting "Ticks" -> {{-1, "cold"}, {0, "ok"}, {1, "hot"}} doesn't work (See Problem with custom ticks in BarLegend in Mathematica 11.1). The tick labels are sorted: ContourPlot[Sin[x] Cos[y], {x, 0, 2 Pi}, {y, 0, 2 Pi}, Contours -> {...

16

Manipulate[u, {u, 0, 1}, FrameLabel -> "FrameLabel"] or Manipulate[u, {u, 0, 1}, FrameLabel -> {{"FrameLabel 1", "FrameLabel 2"}, {"FrameLabel 3", "FrameLabel 4"}}] or Labeled[Manipulate[u, {u, 0, 1}], "Label"] or Manipulate[u, Style["Label", 12, Bold], {u, 0, 1}] or Panel[Manipulate[ Panel[u, "Label 1", FrameMargins -> ...

15

You can specify your PlotLabel to be a construct that takes a TextAlignment or Alignment option, such as Pane. For example: Plot[Sin[x], {x, 0, 5}, PlotLabel -> Framed@Pane["This is the title", Alignment -> Left, ImageSize -> 270], ImageSize -> 300] The Framed isn't necessary; I just included it so you could see what was going on. The ...

15

Possibly more versatile, but you have to mess with text overlapping your plots, but GraphicsRow also accepts Epilog GraphicsRow[{Plot[Sin[x], {x, 0, 4 Pi}], Plot[Cos[x], {x, 0, 4 Pi}]}, Spacings -> Scaled[0.4], Epilog -> Inset["Plot Title", Scaled[{0.5, 0.95}]]]

15

ListPlot[Table[f, {f, {Sin[x], Cos[x]}}, {x, 0, 2 π, 0.1}], PlotLegends ->PointLegend[ (Style[#, 40] & /@ {"sin(x)", "cos(x)"}),Alignment->Center]] Update: As noted by rcollyer in the comments Alignment is an undocumented option for PointLegend. As an alternative, the following old Pane trick works without relying on an undocumented option: ...

15

Edit in response to the comment about Dynamic Rotating (1/3/17) Make a function with three angles as its arguments. The three angles control the rotation of the three axis labels. f[xangle_, yangle_, zangle_] := Module[{}, labelx = Style[Rotate["years", xangle], FontFamily -> "Arial", Bold, 12]; labely = Style[Rotate["coupon %", yangle], ...

14

Update: Using Kuba's nested Callout approach is more robust than the jittering approach in my original answer. The function processCallouts below replaces repeated Callouts with nested Callouts with appropriate position parameters: ClearAll[processCallouts] processCallouts[ls_ : 20, ns_ : 20, off_ : 5, o: OptionsPattern[Callout]] := Flatten @ Replace[...

13

This can also be achieved by encasing the graphic inside a Show, setting the outer Show's PlotRangeClipping to False, and adding the labels as Text commands inside an Epilog. Thus, for your example, you would do Framed[ Show[ Plot[Sin[x], {x, -Pi, Pi} , Frame -> True , FrameLabel -> {{None, None}, {None, Row[{"This is a plot of ", ...

13

opts = {ImageSize -> 500, PlotRange -> {{-5, 15}, All}, PlotPoints -> 84, MaxRecursion -> 9, MeshFunctions -> {Cos[#1] - (1/2)^#1 &}, Mesh -> {{0}}, MeshStyle -> {Directive[Red, PointSize[Large]]}}; You may be interested in the fact that Mesh solution is good for visulatisation purposes but it seems that coordinates ...

13

Based on the comment by Szabolcs I came up with a solution. Here it is xyText[str_, scaling_: 1, offset_: {0, 0, 0}] := Module[{ mesh = DiscretizeGraphics[ Text[Style[str, FontFamily -> "Monospac821 BT"]], _Text, MaxCellMeasure -> 1] }, MeshPrimitives[mesh, 2] /. {x_?NumberQ, y_?NumberQ} :> (scaling {x, y, 0} + offset) ...

13

Here is my attempt: rectangles = Graphics[{GrayLevel[.4, .3], Rectangle[{0, 80}, {100, 100}], GrayLevel[.4, .3], Rectangle[{40, 0}, {60, 80}]}]; arrows = Graphics[{Arrow[{{40, -5}, {60, -5}}], Arrow[{{60, -5}, {40, -5}}], Arrow[{{105, 0}, {105, 80}}], Arrow[{{105, 80}, {105, 0}}], Arrow[{{105, 80}, {105, 100}}], Arrow[{{105, 100}, {105, ...

13

You can use the option ScalingFunctions to achieve what you want: Plot[ 2 Sin[x]+x, {x,0,15}, Frame->True, ScalingFunctions->{Identity,"Reverse"} ]

13

Here are some of my attempts: (code for all versions can be found at the bottom of this answer) Your attempt First for comparison, your attempt (simplified to improve clarity): Labels further away Moving the anchor points away from the sphere: (also suggested in the comments) Custom dynamic callouts An attempt at custom callouts that try to position ...

12

You can extract the probabilities from the properties of the edges and assign them as edge labels using g = Graph[mp]; Scan[(PropertyValue[{g, #}, EdgeLabels] = PropertyValue[{g, #}, "Probability"]) &, EdgeList[g]] g You can find this (and other) properties using the PropertyList function: PropertyList[{g, 1 \[DirectedEdge] 2}] (* {&...

12

This is a minor bug, acknowledged by WRI and present as of v10.4. The problem is that for Plot3D the required syntax for AxesLabel is a list with three entries instead of two. When given a two-member list as an argument, though, Plot3D silently interprets that as the AxesLabel→Automatic setting, and it labels the axes with the internal variables of the plot, ...

11

You can use Epilog to insert the plot label wherever you wish within the PlotRange. Edit: There is a drawback to this approach. Because the title will be within the graph region, there is a possibility that the title will be appear over part of the graph of the function. Plot[Sinc[x], {x, 0, 9}, Epilog -> Text[Style["This is where my plot label goes"...

11

Perhaps a "quick" appoach (in addition to looking at hyperlink of @rm-rf): msp[f_, {xmin_, xmax_}, {ymin_, ymax_}, mfun_, mnum_, swatchsize_, opts : OptionsPattern[]] := Module[{pm, swl}, pm = RegionPlot[x < 1, {x, 0, 1}, {y, 0, 1}, MeshFunctions -> mfun, Mesh -> IntegerPart@(mnum/(swatchsize/10)), Frame -> False, PlotRange -> {...

11

As noticed in this topic it is impossible an could be confusing. The solution is as usual, Overlay :) With[{opt = Sequence[ImagePadding -> {{65, 25}, {40, 15}}, BaseStyle -> {Bold, 15}]}, Overlay@{ Plot[Sin[t], {t, 0, 2 Pi}, FrameLabel -> {{"x [m]", ""}, {"t", ""}}, Frame -> True, FrameTicks -> {{Automatic, None}, {{{0, "t'"}, {2 ...

11

Just for something different (courtesy of idea of Kuba...cannot find reference): ds = Thread[{(ToString /@ names), Re@data}]; f = DynamicModule[{col = Black}, DynamicWrapper[Dynamic@Style[#, col, Bold], If[CurrentValue["MouseOver"], col = Red; pos = #2, col = Black; pos = {}]]] &; With[{d1 = ds}, Column[{ListPlot[{#2} & @@@ d1, ...

11

I found the solution I was looking for at https://stackoverflow.com/questions/8936579/labeling-a-plot-in-increments-of-pi. example: Plot[Sin[x], {x, -Pi, Pi}, Ticks -> {Range[-Pi, Pi, Pi/4], Automatic}] Credits go to Nasser.

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