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
1 answer
ggplot2 - annotate outside plot
How can I insert annotations outside the plot?
I want to add a note on top of the first bar to signal that it continues e.g. up to 1000. If I use annotate, the note won't go outside the plot. (Note that I am using coord_cartesian to limit the y…

brezen
- 11
- 2
0
votes
1 answer
Django 1.8. When we use id field in values and annotate operation in django there is ignore another fields in result sql-query
I want to update Django from 1.7.11 to 1.11.18. But I found a problem. Django makes different sql-queries for different Django versions. For example.
I have a query:
Account.objects
.values('id', 'name', invoice__payment__payment_gateway')
…

Roman
- 61
- 1
- 3
0
votes
1 answer
Question about Group_by in django
UPDATE This has been confirmed to be a bug of the release 1.3. Here is the ticket http://code.djangoproject.com/ticket/15709
So I want to implement this SQL:
selelct id, count(*), max(insert_date) as m_d
from Book
group by id
Here is the Django ORM…

zs2020
- 53,766
- 29
- 154
- 219
0
votes
1 answer
Legends not visible in Line Area Graph
I am making a line area graph with different dataset, I am unable to get legend visible & making last value visible in The graph.
My expected output
https://cdn.filestackcontent.com/99Ji0U7Q7ObTmZN7B0vw
Make Line Area graph in R
my_data <- c(0, …

Vaibhav Singh
- 1,159
- 1
- 10
- 25
0
votes
0 answers
annotate under the x-axis
My data looks like this:
dat <- data.frame(
rate = sample(1:30),
group = sample(c("grp1", "grp2", "grp3"))
)
dat <- dat[order(dat$group),]
dat <- dat %>% group_by(group) %>% mutate(groupid = row_number())
I want to draw a line graph by groups…

mandy
- 483
- 9
- 20
0
votes
0 answers
How to modify a scatter points plot in python
i am working on a python script to produce a scatter points plot.
Now, i would like to do some slight modifications, Here is the actual code
import matplotlib
import matplotlib.pyplot as plt
matplotlib.rcParams.update({'font.size': 22})
#Read…

Persona
- 13
- 3
0
votes
1 answer
labeling data points with dataframe including empty cells
I have an Excel sheet like this:
A B C D
3 1 2 8
4 2 2 8
5 3 2 9
2 9
6 4 2 7
Now I am trying to plot 'B' over 'C' and label the data points with the entrys of 'A'. It should show me the…

Jack.O.
- 171
- 1
- 14
0
votes
3 answers
Line plot for each coordinate in matplot lib
I am trying to plot the lines that connect starting (x,y) and ending (x,y)
That means a line will be connecting (x1start,y1start) to (x1end,y1end)
I have multiple rows in data frame.
The sample data frame that replicate the actual dataframe and…

Zephyr
- 1,332
- 2
- 13
- 31
0
votes
1 answer
Adding variable name outside of panel/plot
Sample-data:
df <- data.frame("SL" = runif(50, 2.2, 5.8), "LMX" = runif(50, 1.8, 5.5))
I have many different variables for each of which I want to make a box plot with the code below. So that all panels will have the same size, I determined the…

Andreas G.
- 190
- 11
0
votes
1 answer
How to italicise part of correlation coefficient annotation in ggplot2
I cannot figure out how the make the letter "R" in the annotate() function below italicised on my plot. I've tried adding in expression() before paste(), and using italic(), but that then pastes the section starting "round(cor..." as text, rather…

gimmeshelter75
- 21
- 6
0
votes
1 answer
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 corresponding values associated with a and b in data.
I've…

Isaac
- 100
- 1
- 7
0
votes
4 answers
matplotlib label subplots of different sizes the exact same distance from corner of each subplot
I am searching for an elegant solution to placing a figure label (A, B, C) above the corner of each subplot using matplotlib- but have each be the exact same distance from the subplot axes corner. The problem I am having is that typical labeling…

djakubosky
- 907
- 8
- 15
0
votes
2 answers
Is there a better way to add these segments to ggplot?
Is there a better way to add all of these segments to a ggplot rather than having each individual line?
annotate("segment", x = -250, xend = -250, y = -50, yend = 315, colour = "gray50") +
annotate("segment", x = 250, xend = 250, y = -50, yend =…

LBV
- 123
- 1
- 6
0
votes
1 answer
Annotate a plot made with ggplot2 with an equation using latex2exp::TeX
My goal is to annotate a plot made with ggplot2 by placing an equation in white space within the plot using the package latex2exp
For example, given the equation:
eqn <- "$\\textbf{Volume}(ml) = 0.035 \\cdot \\textbf{CSA}(mm^2) + 0.127 \\cdot…

user25494
- 1,289
- 14
- 27
0
votes
0 answers
Combining distinct and annotate over a many to many filter with Django
With Django's ORM, I have a simple Question and Topic model like so:
class Topic(models.Model):
name = models.CharField(max_length=200)
class Question(models.Model):
topic_items = models.ManyToManyField(Topic, blank=True)
date_asked =…

Stephen Brown
- 21
- 1
- 2