## labeling – Vertex Labels diferentiating InDegrees from OutDegrees

Does anyone know how can I differentiate vertex labels that are InDegrees vs. OutDegrees?
For example, if the graph shows 1 -> 2, or all “names” from column 1 to column 2, how can I have all those in column one appear in a particular color or font, differentiated from those in column 2?

Thanks!

Has anyone here used 2D Transit or Wizard software for labeling FBA inventory? Amazon recently upped its fees by 50% (or 100% during the Christmas season) for manually checking in box contents, so we're revisiting how we handle this. The alternatives to paying the fee are that you can either upload a box contents list to Seller Central, or you can label your box with a scannable box contents label. We had some trouble with the uploading method, because it was easy to make mistakes, and we'd…

## labeling – Improving label collisions for Tree/Graph?

Historically, MMA has never handled label collisions well, but recently they added some improvements here via things like `Callout`. I want to fix ImageSize but still see as much as possible (by tooltipping a minimally set of vertices).

Here’s two examples of the problem:

Unfortunately, `Callout` doesn’t work in `Graphics` but it does on ListPlot type functions… any ideas?

## A question about tree labeling

Given a tree $$T$$ with $$e$$ edges. Consider a bijection $$f:E(T)rightarrow {1,…,n}$$. Is there an injective function $$g:V(T)rightarrowmathbb{N}$$, such that $$|g(a)-g(b)|=f({a,b})$$ for all $${a,b}in E(T)$$?

## charts – Labeling the bars in a stacked BarChart

I have the following data, which shows the number of events by day of the week (Sunday through Saturday) and hour of the day (00 through 23):

``````  data={<|0 -> 2200, 1 -> 300, 2 -> 100, 3 -> 50, 4 -> 150, 5 -> 1850,
6 -> 2450, 7 -> 2600, 8 -> 3050, 9 -> 4400, 10 -> 5550, 11 -> 8450,
12 -> 7650, 13 -> 7750, 14 -> 6750, 15 -> 6350, 16 -> 5250,
17 -> 4600, 18 -> 3700, 19 -> 2800, 20 -> 2700, 21 -> 2650,
22 -> 2500, 23 -> 1950|>, <|0 -> 1750, 1 -> 100, 4 -> 300,
5 -> 2500, 6 -> 3100, 7 -> 7350, 8 -> 10550, 9 -> 5900, 10 -> 7150,
11 -> 7350, 12 -> 7850, 13 -> 7500, 14 -> 6300, 15 -> 6900,
16 -> 9050, 17 -> 8150, 18 -> 3800, 19 -> 3000, 20 -> 2450,
21 -> 2450, 22 -> 2250, 23 -> 2150|>, <|0 -> 1450, 1 -> 50, 2 -> 50,
4 -> 650, 5 -> 2500, 6 -> 3050, 7 -> 7700, 8 -> 10450, 9 -> 6400,
10 -> 8250, 11 -> 8050, 12 -> 8450, 13 -> 8250, 14 -> 7200,
15 -> 7800, 16 -> 9600, 17 -> 9100, 18 -> 4400, 19 -> 3200,
20 -> 2700, 21 -> 2550, 22 -> 2450, 23 -> 2200|>, <|0 -> 1650,
1 -> 150, 2 -> 100, 4 -> 750, 5 -> 2550, 6 -> 3050, 7 -> 7650,
8 -> 11300, 9 -> 7100, 10 -> 7750, 11 -> 9350, 12 -> 9250,
13 -> 8000, 14 -> 7950, 15 -> 7900, 16 -> 9500, 17 -> 9150,
18 -> 4900, 19 -> 3600, 20 -> 2950, 21 -> 2650, 22 -> 2550,
23 -> 2350|>, <|0 -> 1650, 1 -> 100, 2 -> 50, 3 -> 200, 4 -> 700,
5 -> 2550, 6 -> 3050, 7 -> 7350, 8 -> 11150, 9 -> 7200, 10 -> 8150,
11 -> 8150, 12 -> 8400, 13 -> 8100, 14 -> 7400, 15 -> 7900,
16 -> 9800, 17 -> 9100, 18 -> 4750, 19 -> 3550, 20 -> 2850,
21 -> 2750, 22 -> 2450, 23 -> 2100|>, <|0 -> 1800, 1 -> 50,
2 -> 100, 4 -> 900, 5 -> 2500, 6 -> 3050, 7 -> 7050, 8 -> 9800,
9 -> 6450, 10 -> 7750, 11 -> 8650, 12 -> 9350, 13 -> 8750,
14 -> 7450, 15 -> 8250, 16 -> 9100, 17 -> 9550, 18 -> 6100,
19 -> 4800, 20 -> 3800, 21 -> 3450, 22 -> 3100,
23 -> 2550|>, <|0 -> 2250, 1 -> 350, 2 -> 150, 3 -> 100, 4 -> 150,
5 -> 2250, 6 -> 2550, 7 -> 2500, 8 -> 3500, 9 -> 4350, 10 -> 5200,
11 -> 6900, 12 -> 6600, 13 -> 6600, 14 -> 6150, 15 -> 6350,
16 -> 5650, 17 -> 6200, 18 -> 5400, 19 -> 4850, 20 -> 3750,
21 -> 3850, 22 -> 3400, 23 -> 2950|>}
``````

I’ve created the following stacked BarChart. Each bar is a day of the week.
`ChartLabels->Automatic` labels the hours within each bar, but I’d also like to label the individual bars themselves as Sunday, Monday, Tuesday, etc.

``````BarChart(data, ChartLabels -> Automatic,
ChartLayout -> "Stacked", Joined -> True, ImageSize -> Large,
FrameLabel -> {Style("Day of Week", Bold, 12, Blue),
Style("Volume", Bold, 12, Blue)}, Frame -> True)
``````

I.e., I’d like labels that are specifically associated with each bar, as seen below. But if I use `ChartLabels` to specify the days of the week, I loose the hour labeling. I want to keep both. How do I do that?

``````dow = System`DateObjectDump`\$DaysOfTheWeek;
BarChart(data, ChartLabels -> {dow, None},
ChartLayout -> "Stacked", Joined -> True, ImageSize -> Large,
FrameLabel -> {Style("Day of Week", Bold, 12, Blue),
Style("Volume", Bold, 12, Blue)}, Frame -> True)
``````

## plotting – Labeling axes with the use of Table[Plot3d]

having this command:

``````Table(Plot3D(u(r, phi, n) // Re, {r, 0, 4}, {phi, 0, 2 Pi}), {n, 0, 5,
1})(*Real Part*)
``````

I would like to label all the six plots that are generated, in one go.
It does not work by the usual AxesLabel. How do I put labels on all axes of the 6 outputs from the given command?

Much obliged

## labeling – BubbleChart with Callout

After playing with your data, I saw some strange behaviors from Mathematica 12.2.

``````data = {{{"MYCBP2", 7, 1.31161, 7}, {"F5", 6, 1.65189, 6}, {"IRF2BPL",
6, 1.65189, 6}, {"DMXL1", 6, 1.65189, 6}, {"MROH2B", 6, 1.65189,
6}, {"MACF1", 6, 1.65189, 6}, {"IRS4", 1, 1.31161,
1}, {"HECTD1", 6, 1.65189, 6}, {"KIAA0232", 6, 1.65189,
6}, {"CUBN", 8, 1.63422, 8}, {"PURB", 6, 1.65189, 6}, {"FHOD1",
0, 1.65189, 0}}, {{"CEP350", 7, 2.01659, 7}, {"VPS13C", 7,
2.01659, 7}, {"SPEN", 6, 2.01795, 6}, {"DNAH3", 7, 2.01659,
7}, {"ERCC2", 9, 2.78759, 9}, {"ANK2", 9, 2.78759, 9}, {"HERC1",
8, 2.39479, 8}, {"KRT4", 9, 2.78759, 9}, {"TYRO3", 1, 2.33592,
1}, {"KMT2C", 19, 6.72092, 19}, {"AKAP9", 9, 2.78759, 9}}};
``````

I use `Map` to make `Callout`:

``````data2 = Map(Callout(#((2 ;; 4)), #((1))) &, data, {2})
(*Out: {{Callout({7, 1.31161, 7}, "MYCBP2"), ... }, {Callout({7, 2.01659, 7}, "CEP350"), ... }} *)

BubbleChart(data2, LabelingSize -> 30)
``````

The chart will be plotted but with some errors and no callout

## Solution

But If you change the bubble size of `{"FHOD1", 0, 1.65189, 0}` which is zero to a non-zero value for example `{"FHOD1", 0, 1.65189, 0.5}`, errors will disappear and everything works as expected.

## Problem

It looks like if you set bubble size to zero in any element of your data whether it’s in `Callout` wrapper or not, Mathematica will not show any `Callout`. In Mathematica `BubbleChart` documentation in Details section mentioned:

The value z (bubble size) should be positive.

but it doesn’t discuss Possible Issues of non-positive values.
For example, we have two element with non-zero bubble size wrapped in `Callout`:

``````data3 = {Callout({3, 2, 2}, "test"), Callout({3, 3, 3}, "test")};

BubbleChart(data3)
``````

If I add an element with zero value in bubble size, whether it’s wrapped in `Callout` or not, all the callouts will disappear:

``````data4 = Append(data3, {1.5, 2, 0});

data5 = Append(data3, Callout({1.5, 2, 0}, "test"));

BubbleChart(data4)

BubbleChart(data5)
``````

Results of `BubbleChart` for `data4` and `data5` are the same:

It’s also interesting that in the example above no error raised but in your case, it did.

## plotting – Labeling of 2 equations plotted in 3D plot

I want to plot Subscript((Rho), i)

``````Subscript((Rho), i)=1/(1 + ((-Subscript(r, 1) + 10)/(-Subscript(r, 2) + 10))^(-1/2))

Subscript((Rho), j)=1/(1 + ((-Subscript(r, 2) + 10)/(-Subscript(r, 2) + 10))^(-1/2))
``````

in 3D plot. I have used following code:

``````Plot3D({1/(1 + ((-Subscript(r, 1) + 10)/(-Subscript(r, 2) + 10))^(-1/2)), 1/(1 + ((-Subscript(r, 2) + 10)/(-Subscript(r, 2) + 10))^(-1/2))}, {Subscript(r, 1), 0, 9.99}, {Subscript(r, 2), 0, 9.99}, AxesLabel-> {"!(*SubscriptBox((r), (1)))", "!(*SubscriptBox((r), (2)))", "!(*SubscriptBox(((Rho)), (i)))", "!(*SubscriptBox(((Rho)), (j)))"})
``````

But, I cannot label

Subscript((Rho), i) and Subscript((Rho), j)

## plotting – Labeling cluttered vertices

I am trying to create a ConvexHullMesh plot where the vertices are labeled with their positions. I generate the ConvexHullMesh using

``````region =
ConvexHullMesh[Join[pts1, pts2], Axes -> True, MeshCellStyle -> {1 -> Opacity[1, Red]},
MeshCellHighlight -> {2 -> Opacity[.3, Red]}, Frame -> False]
``````

and then use

``````HighlightMesh[decompregion, Style[0, Directive[PointSize[0.015], Black]]]
``````

to highlight the vertices. Which gives me this output:

Now I want to additionally see the positions of the vertices. The only thing I figured out yet, was `HighlightMesh[decompregion, Labeled[0, "Index"]]` which provides

First of all, I am not able to combine the `Labeled` and `Style` command. When I simply use `HighlightMesh[decompregion, Style[0, Directive[PointSize[0.015], Black]], Labeled[0, "Index"]]` I get an error.

Secondly I’d like to see the positions of the points and not their label. Is this possible? And furthermore as you can see, since the vertices are cluttered one can barely read the labels. Is there some way of positioning the labels further away from the boundary and use some lines which indicate the corresponding point or some other smart solution to make it more readable? Increasing the plot size would be one step to improve it, however I also wasn’t able to do that.

Any help is highly appreciated.