Questions tagged [annotate]

Use this tag for questions related to annotating plots, e.g. adding descriptive labels or annotations to data points.

398 questions
306
votes
9 answers

Matplotlib scatter plot with different text at each data point

I am trying to make a scatter plot and annotate data points with different numbers from a list. So, for example, I want to plot y vs x and annotate with corresponding numbers from n. y = [2.56422, 3.77284, 3.52623, 3.51468, 3.02199] z = [0.15, 0.3,…
Labibah
  • 3,963
  • 4
  • 18
  • 23
97
votes
1 answer

How to left align text in annotate from ggplot2

My example is: qplot(mtcars$mpg) + annotate(geom = "text", x = 30, y = 3, label = "Some text\nSome more text") How do I get the text here to be left aligned? So that the 'Some's line up with each other.
kennyB
  • 1,672
  • 1
  • 15
  • 21
85
votes
2 answers

Label python data points on plot

I searched for ages (hours which is like ages) to find the answer to a really annoying (seemingly basic) problem, and because I cant find a question that quite fits the answer I am posting a question and answering it in the hope that it will save…
ashley
  • 1,385
  • 1
  • 12
  • 18
64
votes
3 answers

Matplotlib overlapping annotations / text

I'm trying to stop annotation text overlapping in my graphs. The method suggested in the accepted answer to Matplotlib overlapping annotations looks extremely promising, however is for bar graphs. I'm having trouble converting the "axis" methods…
homebrand
  • 833
  • 1
  • 7
  • 9
19
votes
4 answers

Matplotlib: Add strings as custom x-ticks but also keep existing (numeric) tick labels? Alternatives to matplotlib.pyplot.annotate?

I am trying to produce a graph and I am having some issues annotating it. My graph has a log scale on the x-axis, showing time. What I want to be able to do is keep the existing (but not predictable) numeric tick labels at 100 units, 1000 units,…
FakeDIY
  • 1,405
  • 2
  • 14
  • 22
18
votes
2 answers

Very confused... problem using 'annotate' in Django

So I have two models, a Ranking model and a UserRanking model. The app centers on people taking a list of items and ranking them (ex: "Best Movies of 2008"). The Ranking model is the overall aggregate ranked list, which is calculated from all the…
Daniel Waltrip
  • 2,220
  • 3
  • 22
  • 28
17
votes
2 answers

multiple annotate Sum terms yields inflated answer

In the following setup, I'd like a QuerySet with a list of projects, each annotated with the sum of all its task durations (as tasks_duration) and the sum of all of its tasks' subtask durations (as subtasks_duration). My models (simplified) look…
Charl Botha
  • 3,928
  • 30
  • 48
16
votes
4 answers

django aggregate or annotate

This is a very stupid thing, I know, but I just don't seem to get the handle on Django aggregate and annotate functions. I have a very simple set of models: Events, Areas and Types. An event has foreign keys pointing to Area and Type. I would…
freethrow
  • 936
  • 2
  • 14
  • 30
16
votes
2 answers

Eclipse Equivalent of IntelliJ's Annotate (or Git Blame)

Its been a minute since I've developed in eclipse. Is there an equivalent of IntelliJ's annotate feature? In essence, you right click on the margin and select annotate. After which in the margin you see who the last people where who made…
James Oravec
  • 16,761
  • 25
  • 77
  • 145
16
votes
3 answers

Annotate a queryset with the average date difference? (django)

I searched all over place for an answer to this but couldn't find anything. Perhaps this is just a stupid question or a really tricky one. Here it is: Let's say my model is this (pseudo django code): Event type = ForeignKey(EventType) name =…
Nicolas R
  • 936
  • 1
  • 8
  • 17
15
votes
2 answers

Changing background color for a text annotation to increase contrast and visibility

I'd like to change the background color for my annotate text so that it's green and covers up anything behind it (like the horizontal line in the example below). How do I do that? ggplot() + geom_hline(yintercept=0) + …
Andy Stein
  • 321
  • 1
  • 2
  • 8
15
votes
2 answers

git blame: correct author after merge

A GIT merge introduces a new commit. This causes problems with "git blame": the merged lines appear to be committed by the developer that did the merge. I can understand this being the case for conflicting changes (because he solved the conflicts).…
14
votes
2 answers

Django, division between two annotate result won't calculate correctly

I'm trying to get a division between two annotate results in queryset. Impression is much larger than click, so I should get tenth decimal. def get_queryset(self): return googleData.objects.filter(account=self.account_name).\ …
viviwill
  • 1,235
  • 2
  • 13
  • 24
13
votes
1 answer

R: How can I annotate a ggplot with a text box?

I am looking to add a small white text box, with custom text in the body of my ggplot plot. The text I want to add is to identify a horizontal line I am adding to the plot. ggplot(cb_emp) + geom_point(aes(x = grossunits, y =…
ChetanMV
  • 145
  • 1
  • 1
  • 5
13
votes
3 answers

Annotate PDF within iPhone SDK

I have managed to implement a very basic PDF viewer within my application, but was wondering if it was possible to add annotations to the PDF. I have looked through the SDK docs, but not found anything. I have 2 questions really: Is it possible to…
Jack
  • 3,848
  • 13
  • 40
  • 71
1
2 3
26 27