Questions tagged [annotate]

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

490 questions
16
votes
3 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,503
  • 3
  • 17
  • 27
15
votes
1 answer

Arrow properties in matplotlib annotate

I have Matplotlib version 1.5.1 and I am facing an interesting problem. I want to add an arrow to my plot, which would have heads on each end and specified colour and width. However, studying the Matplotlib documentation on this matter, I realized I…
durbachit
  • 4,626
  • 10
  • 36
  • 49
13
votes
1 answer

Annotate query set with field value

Multilanguage website with translations stored in columns of one table. Need to pass query set to template with already filtered translations. Language variable is stored in session. class Item(models.Model): name =…
Vémundr
  • 395
  • 1
  • 7
  • 17
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,878
  • 15
  • 42
  • 72
13
votes
1 answer

How to add an asterisk symbol in a mathematical expression?

I'm trying to annotate a plot with R² value and significance coding, but I can't pass * as a symbol and not as the juxtaposition operator. I've tried ?plot.math, here is what I…
fstevens
  • 1,287
  • 1
  • 17
  • 28
13
votes
2 answers

Annotate several points with one text in matplotlib

I want to use single annotation text to annotate several data points with several arrows. I made a simple workaround: ax = plt.gca() ax.plot([1,2,3,4],[1,4,2,6]) an1 = ax.annotate('Test', xy=(2,4), xycoords='data', xytext=(30,-80),…
MnZrK
  • 1,330
  • 11
  • 23
12
votes
4 answers

Django - How can you include annotated results in a serialized QuerySet?

How can you include annotated results in a serialized QuerySet? data = serializer.serialize(Books.objects.filter(publisher__id=id).annotate(num_books=Count('related_books')), use_natural_keys=True) However the key/value pare {'num_books': number}…
Nunovsky
  • 365
  • 4
  • 18
12
votes
1 answer

How to annotate ggplot2 qplot outside of legend and plotarea? (similar to mtext())

I would like to annotate my plots with a filename. With plot() I used mtext: plot(1:10) mtext("File xy-12-34-56.csv", 4) How can I do that with ggplot2 and qplot or ggplot? It should not collide with the legend. I found the commands annotate and…
Jonas Stein
  • 6,826
  • 7
  • 40
  • 72
11
votes
2 answers

Add textbox to facet wrapped layout in ggplot2

I am aware that one is able to annotate a plot created by ggplot2 or even to combine large and small viewports, as is documented in the ggplot2-book. However, it seems that these only work in the actual plot-areas and not in the "final plot". For…
Jens
  • 2,363
  • 3
  • 28
  • 44
10
votes
2 answers

Insert custom annotation in java 'field' using annotate plugin + JAXB (upon xsd -> java)

Use case: Wanna insert custom annotation to fields in java class generated by JAXB Problem: Using Annotate plugin + JAXB [1], am able to successfully insert custom annotations but they are getting inserted at getter method rather than field. Morphia…
Hari
  • 384
  • 1
  • 6
  • 20
10
votes
1 answer

Custom arrow style for matplotlib, pyplot.annotate

I am using matplotlib.pyplot.annotate to draw an arrow on my plot, like so: import matplotlib.pyplot as plt plt.annotate("",(x,ybottom),(x,ytop),arrowprops=dict(arrowstyle="->")) I want to use an arrow style that has a flat line at one end and an…
GJP
  • 415
  • 4
  • 13
9
votes
2 answers

Visual Studio Annotate changing line number in view

I'm using Visual Studio 2010 with VB.NET, in a 4.0 project, with Team Foundation Server. When I annotate, not only do I not see line numbers (which is apparently an unfixed bug with VS 2010 -…
Drew Miller
  • 675
  • 6
  • 15
9
votes
1 answer

Difference between caption, draw, annotate, label while adding text to ImageMagick

I'm trying to add text to an image using ImageMagick. I see multiple examples using draw, label, caption, annotate et al. What is the difference between the above? I am able to test the results of the above commands with CLI, however am facing…
Mayuri M.
  • 121
  • 1
  • 2
9
votes
2 answers

Labelling a matplotlib histogram bin with an arrow

I have a histogram plot which could be replicated with the MWE below: import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import numpy as np pd.Series(np.random.normal(0, 100, 1000)).plot(kind='hist', bins=50) Which creates a…
BML91
  • 2,952
  • 3
  • 32
  • 54
9
votes
1 answer

Django, How to make multiple annotate in a single queryset

I am currently trying to annotate two different number of likes to a User model in Django. Here's the code I'm using to return the desired querySet def get_top_user(self): return User.objects. \ …
1
2
3
32 33