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}], ...


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


23

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

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


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___] :> ...


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

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

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


14

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}] (* {&...


14

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


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

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.


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

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

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

Few additional methods: p1 = Plot[Sin[x], {x, 0, 2 Pi}, ImageSize -> 200]; p2 = Plot[Cos[x], {x, 0, 2 Pi}, ImageSize -> 200]; Labeled Labeled[Panel@GraphicsRow[{p1, p2}], Style["Label", "Subsubsection"], Top] // Panel Panel Panel[GraphicsRow[{p1, p2}], Style["Label", "Subsubsection"], Top] // Panel (* same picture *) Legended Legended[Panel@...


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

Example Description Use Style to format the text. I also didn't include the output of your LogPlot due to being unaware of your f[x] and g[x] definitions. Code Plot[ Sin[x], {x, 0, 2 Pi}, AxesLabel -> {Style["x", Bold, 16], Style["Sin(x)", Bold, 16]} ] in your case LogPlot[ {f[x], g[x]}, {x, 0, 1000}, Frame -> {True, True, False, False}, ...


11

Edit to add Labeled details You can use Callout for 'in-plot' labels, for example: Plot[{ Callout[Sin[x], "Sin[x]", Below], Callout[Cos[x], "Cos[x]", Below] }, {x, 0, 10}, PlotStyle -> {Red, {Blue, Thick}} ] Alternatively if you do not have version 11 you can use Labeled to get a similar effect, like this: Plot[{ Labeled[Sin[x], "Sin[x]", ...


11

Try the following: (if you don't understand what an option does, leave a comment - but please look in the documentation center first) addCallout[min_, max_, date_, val_, Left] := {Line@{{min, val}, {date, val}}, Text[Pane[Round@val, FrameMargins -> 10], {min, val}, {1, 0}]} addCallout[min_, max_, date_, val_, Right] := {Line@{{max, val}, {date, val}}, ...


11

I don't think that a density plot is ideal for achieving the image above. I'd us a different approach in this case. Let's start generating the data: max = 50; entries = RandomReal[{0, max}, {24, 7}]; dim = Dimensions@entries; We can now create the final table: head = {"", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}; ...


11

LogLogPlot[{x, x^2, x^1.5, 5/x}, {x, 0.5, 3}, PlotRange -> {{0.5, 3}, {0.5, 10}}, Frame -> True, FrameStyle -> Directive[Black, 25], PlotStyle -> { {Thick, Blue}, {Thick, Red}, {Thick, Darker@Darker@Green}, {Thick, Blue}, {Thick, Blue, Dashing[0.02]}, {Thick, Darker@Darker@Green, Dashing[0.02]}}, ImageSize -> Large, ...


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