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
0 answers
Convert datetime object to string in annotate in Python(Django)
I have a queryset like:
queryset = MyModel.objects.filter(available=True).values('creation_date')
here activation_date is DateTimeField in models. How can I convert this field('activation_date') in string?
I am getting error like:
'datetime object…

Rai Shahnawaz
- 188
- 11
0
votes
0 answers
Getting minimal response when using dynamic URL and getting full response when using static URL
I am using Google Cloud Video Intelligence API to fetch the details from the video. I am sending the video as base64 in the body to the cloud with the API…

Flutter
- 123
- 1
- 9
0
votes
0 answers
ggplot2: How do I colorize elements of a table within a plotarea?
I made a bar plot with ggplot2 that contains a data table within its plot area. How can I colorize text elements within this data table?
I know how to colorize text with "geom_richtext", but how is it done in a data table ?
The example below draws…

ulrichstefenelli
- 11
- 2
0
votes
1 answer
How i put R for pearson correlation in italic font inside an annotate function in ggplot?
i used iris data for an example
`
iris %>%
ggplot(aes(Sepal.Length,
fill = Species))+
geom_density(alpha = .6,
bw = 0.5)+
theme_classic()+
annotate("text",
x = 7,
y = c(.55,…

Matheus Pacheco
- 1
- 1
0
votes
1 answer
R annotate estimates with p < 0.05
This is an extension of my old question on the topic of error bars. Suppose this is my test data.
df1<-"Group Est conf.low conf.high pvalue
Bi 1.12 0.65 1.603 0.000
Di -0.24 -0.44 …

Ahir Bhairav Orai
- 611
- 1
- 7
0
votes
1 answer
Python: Annotate max value of bar graph: string x, int y
1-week old newbie here. I've successfully created a chart showing states on the x-axis and rate on the y-axis. I'm struggling trying to annotate the max value, e.g. Maine @ 1.10%. Below works fine, but it's manual in that I'm plugging in the…

BP12
- 27
- 6
0
votes
1 answer
Why does kubectl annotate does work and kubectl patch does not?
I am trying to use ‘kubectl patch’ to provide an annotation to a default service account in a namespace. This is because the JavaScript client does not seem to have a kubectl annotate function. So now I wonder:
Why does the following patch command…

Jeroen
- 727
- 1
- 9
- 20
0
votes
0 answers
django perform queryset so slow
I'm making a django app that calculates popularity from google trends.
I tried to annotate the calculated values from graph data.
However, it took about 5 seconds to execute this queryset. (Using sqlite3, postgresql)
I have a few questions here.
I…

gypark
- 251
- 1
- 8
0
votes
2 answers
0
votes
0 answers
batch annotation for similar pdf files
I have many pdf files with same layout in which I need to fill in some details with plain text and sign in certain places with company stamp.
I am trying to automate things, so I am after a way to fill in the details + stamp the first file and then…

Moshe
- 7
- 4
0
votes
3 answers
Annotation label clipped in ggplot2
I'm trying to avoid the bottom annotation being clipped. It's the descender on the "p" that gets chopped off. I've used the "inward" option on vjust.
df <- data.frame(x=c(as.Date("2020-01-01"),as.Date("2022-01-01"))
…

GeeGeePlottR
- 25
- 1
- 4
0
votes
1 answer
ggplot annotate each facet with different geom_rect dimensions
I am trying to annotate each facet of my ggplot with a different geom_rect object.
Reproducible example:
a <- c(x= rnorm(30, mean = 100, sd=2))
b <- c(rep(c("X", "Y"), 30))
c <- c(rep("F", 15), rep("M",15))
abc <- data.frame(a, b, c)
This is my…

Nidhi Desai
- 27
- 4
0
votes
1 answer
Geopandas map annotate not visible
I don't understand why I can't annotate my map of the United States.
import fiona
import geopandas
import matplotlib.pyplot as plt
from shapely.geometry import Polygon,box
countries_gdf =…

Rima ManHart
- 1
- 1
0
votes
1 answer
How can you use 'annotate' with 'montage' or pipe a for loop that uses 'convert', on a directory of images, to 'montage'?
I have been trying for days to write a script that creates a simple proof sheet from a directory of images. The only scripts I found label the images, which I don't like. I wanted to annotate them as per Labeling on top of the Image itself....
I was…

hmj6jmh
- 630
- 5
- 13
0
votes
1 answer
How to gain control over annotate arrows
I'm trying to insert arrows (brackets) in plots using the annotate package, but I cannot figure out what the input parameters mean. I read the documentation and I'm still unsure of how to control the arrows. Here's an example starting…

tnknepp
- 5,888
- 6
- 43
- 57