Questions tagged [annotate]

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

490 questions
0
votes
1 answer

Question from Pro Drupal 7 Book: Annotate module

So this is likely a shot in the dark, but for anyone out there who knows a bit of Drupal and better yet has implemented the annotate module from Ch. 2 of Pro Drupal 7 Development Do you know how to alter the annotate module so all users can…
djs22
  • 1,148
  • 3
  • 14
  • 30
0
votes
1 answer

Annotate text in ggplot2 plot ,included in a shiny app, does not work when I use fileInput to insert my dataset

Below I have a fine working example with iris dataset. As you can see the annotated text is updated and displayed inside the plot everytime I change the variables. The problem is that my actual dataset comes from a csv file which I need to insert…
firmo23
  • 7,490
  • 2
  • 38
  • 114
0
votes
2 answers

Scatter plot move labels

I created a map of some large ports. With 'x' and 'y' latitude and longitude and 'text' the port names. x,y = map(lonA, latA) map.scatter(x, y, s=Size, c=color, marker='o', label = 'Ports',alpha=0.65, zorder=2) for i in range (0,n): …
Jellyse
  • 839
  • 7
  • 22
0
votes
1 answer

Getting Max count based on Vehid group by Houseid Django

This is the image of the table and output required with details So, I wrote a Django query ModelClassName.objects.values('houseid','vehid').annotate(Count('vehid')).order_by('houseid') This is giving me the count of each vehid but as I am not sure…
shelholmes221
  • 518
  • 1
  • 7
  • 18
0
votes
1 answer

How to filter objects based on Foreign key

I have 2 model classes called product and product_category class product_category(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL, default=1, on_delete=models.CASCADE) category_name = models.CharField(max_length=20,…
Ali
  • 15
  • 1
  • 5
0
votes
1 answer

Plot conditional on value of a variable

I'm trying to annotate a plot conditional on a value of a variable: for i, txt in enumerate(vectors.word): if vectors['count']>=50: plt.annotate(txt, (yframe.x[i], yframe.y[i]), fontsize=20) But I get a ValueError: The truth value of a…
profhoff
  • 1,017
  • 1
  • 13
  • 21
0
votes
2 answers

annotate a label to query based on thresholds that it falls within

I am trying to label my results based on two properties of my query set which falls within each combination of two threshold of another query. Here is a piece of code for clarification: threshold_query = threshold.objects.all() main_query =…
Azee
  • 329
  • 6
  • 20
0
votes
1 answer

Superimposing the text from input form on top of an image

I want the text that I write on the input to be shown inside the "engrave-image" div. For some reason, I cannot get it to work. I appreciate your help. function annotate(obj) { var typed = document.getElementById(obj).value; …
Donki
  • 660
  • 6
  • 21
0
votes
1 answer

Annotate the axis ggplo2

I am trying to create an annotation (particularly a rectangle) over a ggplot. Here's what I want to get: I have tried geom_rect but that can only draw inside the plot axis. I have also attempted to use annotate_custom which this post mentions,…
0
votes
0 answers

R: How to extend this polygon at the first and last x ticks with ggplot2?

I have this plot code: ggplot() + annotate("rect",xmin=as.Date("1900-01-01", "%Y-%m-%d"), xmax=as.Date("2020-12-31", "%Y-%m-%d"), ymin=bind.fine[1,3], ymax=bind.fine[1,4], alpha=0.4, fill="gray70")+ geom_hline(yintercept=7188.349,…
skylobo
  • 151
  • 1
  • 9
0
votes
1 answer

Add a geom_text/annotate layer to a geom_point layer overlaid on a geom_histogram

I have data that I want to plot in a geom_histogram, and it has a few points that I want to overlay on the histogram with geom_point and then annotate them (either with geom_text or annotate). Here's the histogram and…
dan
  • 6,048
  • 10
  • 57
  • 125
0
votes
1 answer

Django - How to get the maximum value after distinct on fields

I have those models: class Product(models.Model): name = CharField(max_length=128) other_fields... class Price(models.Model): product = ForeignKey(Product) store = CharField(max_length=128) price = DecimalField(max_digits=10,…
user1557330
  • 129
  • 1
  • 1
  • 9
0
votes
4 answers

How do I know which groups each product is in?

class Product(models.Model): name = models.CharField(max_length=256) class Group(models.Model): name = models.CharField(max_length=32, unique=False) products = models.ManyToManyField(Product, blank=True) Products in group.pk ==…
ns5d
  • 39
  • 1
  • 7
0
votes
1 answer

Django : aggregation down to specific level after annotation() & value()

I'm trying to aggregate values down to a specific level with Django, but it does not seem straighforward : aggregation occurs at the full queryset or at the object level, but not 'in-between'. Here is my query : I need to compute a total activity…
Atopus
  • 35
  • 7
0
votes
1 answer

Adding background to annotated text on image in Imagick

everyone. I am doing a college project on Online Photo Editor but I am facing some problem in adding a background color to the text that I'm adding on an image using Imagick. Below is the php code for Imagick used caption.php