Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
36 views

Showing value labels in axes 2 in line chart [duplicate]

I've show the y1 label using plt.annotate, but I couldn't do the same for the y2. Could you help me? plt.figure(figsize=(10,4)) x = [201901, 202001, 202101, 202202] y1 = [6.86, 21.45, 6.25, 0.88] y2 =...
Deivid's user avatar
  • 57
0 votes
1 answer
155 views

Avoid cut geom_label() with facet_wrap()

in the plot below I have data distributed into four groups separated via facet_wrap(). However, these groups have an uneven distribution of the data, hence, all groups have different bar sizes. How ...
Larissa Cury's user avatar
0 votes
2 answers
1k views

Annotate ggplot with multiple coloured text annotations the same as the legend / plot features

I'm trying to annotate a ggplot that shows multiple results of the same response on different days. When I plot the data, I set col = day in the aes command. How do I annotate the ggplot with mean ...
A.Benson's user avatar
  • 475
1 vote
1 answer
481 views

How to annotate the data points with the index or column value in the dataframe

I draw a normal distribution plot based on the dataframe, then I want to annotate some data points in the plot as the index or column value of that data points. For example, here we have a dataframe: ...
pinoak's user avatar
  • 13
0 votes
1 answer
789 views

Add labels to scatter plot

I cannot seem to add labels to my scatter plot. I want to label the scatter with the variable states. It is currently not working either due to conflict with annotate or some other geom function. Here ...
SamV's user avatar
  • 118
0 votes
1 answer
636 views

How to fit the end of line labels when using ax.annotate?

I have this chart which I'm quite happy with except that I cannot fit 4 labels at the end of the lines and it does not look good when I am saving it as a pdf. I have already tried changing figsize to ...
Bluetail's user avatar
  • 1,281
1 vote
0 answers
1k views

Labelling group boxplot in seaborn with mean and standard deviation values [duplicate]

How can I label each boxplot in a seaborn grouped boxplot with the mean and standard deviation value? My code is import pandas as pd import seaborn as sns from os.path import expanduser as ospath ...
Mati Malik's user avatar
0 votes
1 answer
366 views

Using variable elements as superscripts and subscripts for Plot labels on ggplot2

Using geom_jitter(), I plot a and b. For each point on the plot I want to display a label of the form $c^(d)_(e)$ ie, variable c with superscript d and subscript e, where c, d and e are the ...
Isaac's user avatar
  • 100
0 votes
2 answers
2k views

Scatter plot move labels

I created a map of some large ports. With 'x' and 'y' latitude and longitude and 'text' the port names. x,y = map(lonA, latA) map.scatter(x, y, s=Size, c=color, marker='o', label = 'Ports',alpha=0....
Jellyse's user avatar
  • 861
1 vote
3 answers
2k views

I cannot separate two annotate labels with a comma

First of all, I'm beginner R user. I wanna add R-square and p-value in my chart. But, in a line just separate by a comma. Attached is the code I'm trying to use. ggplot(data, aes(x,y))+ geom_point(...
Pedr Nton's user avatar
0 votes
1 answer
63 views

Word wrap in ggmap labels?

I have some very long labels for points on a map (Avg 35 chars per label). Is there a "word wrap" of sorts in ggmap annotate (or other labeling function) so the lines are not stretched across the map?...
Gondi's user avatar
  • 67
0 votes
1 answer
994 views

Inserting custom text in annotate() - R not working

It has been already asked but I couldn't find the exact answer for this. I am wondering if the following is doable. I have a bunch of scatter plot data in ggplot2 library and each has different mean ...
kukushkin's user avatar
  • 332
8 votes
4 answers
3k views

geom_text does not appear using scale_y_log10

I can add text to a ggplot using geom_text just fine (example using the cars database): ggplot(cars, aes(speed, dist), color='blue') + geom_point(size=0.8) + geom_text(y=25, x=5, aes(label=paste("...
Joseph Kreke's user avatar
100 votes
3 answers
240k views

Label data points on plot

If you want to label your plot points using python matplotlib, I used the following code. from matplotlib import pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) A = anyarray B = ...
ashley's user avatar
  • 1,565
3 votes
1 answer
3k views

Label 3Dplot points + update

I'm quite new with python and matplotlib and this website helped me a lot. but I couldn't find a complete answer about this subject. I would like to annotate the point of a 3d plot using matplotlib, ...
Adrien G.'s user avatar