Use this tag for questions related to annotating plots, e.g. adding descriptive labels or annotations to data points.
Questions tagged [annotate]
490 questions
0
votes
2 answers
How do I add a legend based to my scatterplot based on annotate("rect")?
I have created a scatterplot using ggplot2 in RStudio with the function annotate("rect".... to add a layer of colours based on another variable. I have been trying to add a legend for SO long by googling and trying different methods found on this…

Lucie
- 31
- 1
- 2
0
votes
0 answers
Multiple dollar signs in my annotated string in matplotlib
I've searched all over and can't find a strait forward answer to this question. I tried ax.text as well instead of annotate and still couldn't get it to work. I simply want to print my string EXACTLY as I typed it in the code, but matplotlib keeps…

TER
- 107
- 6
0
votes
1 answer
Symbol lambda (λ) is not showing up when exporting image as PDF in R?
I created a figure in R using ggplot2, and using annotate I included a lambda (λ) symbol in the text. However, when I do Export > Save as PDF, the PDF image does not show the lambda and instead just shows a ".." I have attached an example of what…

ramateur
- 41
- 5
0
votes
2 answers
Error when looping with lapply to add text with value from one column in a ggplot
I am following up my last question here because I got a bit greedy and I wanted to add something more to my plots so I decided I would create a new post.
So to summarize I wanted to make several plots in a loop and someone suggested using lapply…
0
votes
1 answer
Django how to get the value of other fields in annotate Max?
I want to get the value of other fields('status') in annotate Max or Min,how can I do it?
DB
user
time
status
name_a
2022-01-03 11:23:40.000000
3
name_a
2022-01-03 17:56:41.000000
4
name_a
2022-01-03 22:24:28.000000
1
name_a
2022-01-04…

yuong
- 3
- 2
0
votes
0 answers
R - Filled area using geom_rect or annotate rect, returning errors
I'm trying to create a colored/shaded horizontal band across my graph in RStudio. I want the filled band between 60 and 100 on the y axis, the entire length of the x axis.
x axis is a date range
y axis is numerical
Here's my Data set
I've tried a…

Angela Malzow
- 1
- 1
0
votes
0 answers
Cannot resolve keyword annotated field django
this is my model
class ExchangeReportTime(models.Model):
creator = models.ForeignKey('accounts.Account', on_delete=models.CASCADE, null=True, verbose_name=_('Creator'))
create_time = models.DateTimeField(default=timezone.now)
exchange =…

hn_tired
- 690
- 10
- 21
0
votes
2 answers
All of my ggplot annotations disappear when adding a picture using inset_element?
I am working on a plot that will have the data curve, a png image inset, as well as annotations. However, every time I add my inset image all of my annotations disappear and I'm not sure what I am doing wrong. Help would be greatly appreciated! I…

j-asano
- 35
- 4
0
votes
1 answer
How to make an annotation layer relative to a geom_point layer
I would like the annotated text on this chart to be relative to the data points on the line chart because this report is parameterized so the points change with each iteration. How do I make the annotation layer relative to the geom_point…

Shannon
- 125
- 7
0
votes
1 answer
How can I annotate another annotate group by query in Django?
I have two queries:
Proyecto.objects.filter().order_by('tipo_proyecto')
Proyecto.objects.values('tipo_proyecto').annotate(total=Sum('techo_presupuestario'))
How can I make this in only one query? I want that the first query contains an annotate…
0
votes
0 answers
Filtring queryset for a current week using Django and Chart.js
How to filter django queryset for a current week using Django and Chart.js?
In my program below, the result obtained only displays the information concerning the current day's event of the current week and does not display the information of the…

Saliha Alger
- 43
- 6
0
votes
2 answers
group by week for each year in django
I did find this comment from @HenryHeikkinen very usefull
How to group by week in postgresql
So I did correct my code.
But still it is not ok. I did find some situation when it is not working correctly.
When year is chaning during first week.
My…

janci
- 49
- 6
0
votes
2 answers
How can I write an equation with superscripts using annotate in ggplot2?
I am having trouble figuring out how to write out an equation using annotate in ggplot2.
Here is an example of what I want to get, I just can't figure out how to get the superscripts in the equation and R^2 there.
Here is the code I have so…

ramateur
- 41
- 5
0
votes
0 answers
Django annotate division does't calculate float numbers correctly
I'm trying to divide numbers that are stored in database in millionth, but the decimals are lost.
conditions_set.annotate(
_amount_from=ExpressionWrapper(F('amount_from')/1000000, output_field=FloatField()),
…

Edoardo Zucchelli
- 77
- 1
- 10
0
votes
2 answers
How to fix problem with "for" in the ggplot2 label
I'm trying to make a plot with facets and add annotations in each of the facets.
I want the annotations to look like "p for trend=0.001" like the plot such as this image.
The plot I made looks like the following:
ann_text <- data.frame(x =…

Amy
- 83
- 1
- 10