Questions tagged [annotate]

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

490 questions
8
votes
5 answers

How can I wrap text using Imagick in PHP so that it is drawn as multiline text?

The Imagick library in PHP allows you to draw text on top of an image. How can I tell Imagick to wrap the text based upon some bounded text box, so that the words appear as multiline text rather than a single line?
BMiner
  • 16,669
  • 12
  • 53
  • 53
8
votes
1 answer

How to do annotations with Altair

I am trying to write some text inside the figure to highlight something in my plot (equivalent to 'annotate' in matplotlib). Any idea? Thanks
Yiti
  • 281
  • 3
  • 9
8
votes
3 answers

Is there a Diff library for java that supports Annotate/Blame?

I'm digging through Google's results for free (open source) Java diff libaries, and there seem quite a bunch of those (some of them even working with generic Objects and not only with Strings). Before I'm digging through tons of search results and…
mihi
  • 6,507
  • 1
  • 38
  • 48
8
votes
2 answers

ggplot annotate with greek symbol and (1) apostrophe or (2) in between text

unable to add greek letters in ggplot annotate, when either: it is sandwiched in between other text, or the text in question contains an apostrophe. For example, the following works fine: df <- data.frame(x = rnorm(10), y =…
treetopdewdrop
  • 172
  • 5
  • 15
8
votes
3 answers

how to use imagick annotateImage for chinese text?

I need to annotate an image with Chinese Text and I am using Imagick library right now. An example of a Chinese Text is 这是中文 The Chinese Font file used is this The file originally is named 华文黑体.ttf it can also be found in Mac OSX under…
Kim Stacks
  • 10,202
  • 35
  • 151
  • 282
7
votes
1 answer

Why won't serialize capture annotate fields?

I had no idea adding data to a queryset would be so hard. It's like, if it didn't come directly from the db then it might as well not exist. Even when I annotate, the new fields are 2nd class citizens and aren't always available. Why won't serialize…
Openmic
  • 227
  • 2
  • 12
7
votes
0 answers

Django QuerySet annotation. How to make aware datetime with user's timezone from F expression?

I've created a Django 1.11. application. I have a model to store periods of time for users WeeklySchedule(models.Model): """Model representing a weekly schedule of user""" user_profile = models.ForeignKey(UserProfile) DAY_OF_WEEK =( …
Alex
  • 71
  • 4
7
votes
2 answers

Programmatically get TFS blame (annotation) data

I'm trying to implement a plugin for Team Foundation Server 2010 that will create reports about users in a team project. Conceptually, all I need in order to properly implement this plugin is access to the same data that you get when you use the…
MaxML
  • 320
  • 2
  • 10
7
votes
1 answer

Add grid.text to arrange.grob for export as PNG

I am attempting to create and export, as a PNG file, with several plots arranged in a 3 X 2 matrix. Each row (containing two plots) has its own X axis. I can add the additional axes via a grid.text but this grid.text is not exported with the PNG…
tcacek
  • 71
  • 1
  • 2
7
votes
1 answer

Use ifnull default in django aggregation

I have the following model classes: class Goods(models.Model): name = models.CharField(max_length=100) class InRecord(models.Model): goods = models.ForeignKey(Goods, related_name='in_records') timestamp = models.DateTimeField() …
Alfred Huang
  • 17,654
  • 32
  • 118
  • 189
7
votes
1 answer

Django: how to order_by on a related field of a related field

I'm using annotate to add a property to an object which I can then use for order_by. However, I want to annotate on a field of a relation on a relation. I know I should be able to get to the field somehow using double-underscore notation, but I just…
foresmac
  • 125
  • 2
  • 8
6
votes
2 answers

how to annotate rails models in rails version 3.2.1

Im trying to follow some online tutorial on annotating my models in rails. However, it seems all the tutorials are either talking about outdated annotation versions or incorrect installations its a mess. So far Ive tried the following 1) Added this…
banditKing
  • 9,405
  • 28
  • 100
  • 157
6
votes
1 answer

Django: how to annotate based on another annotation, or perform operations on an annotation

So I am making something that organizes a school schedule. The school in question is organized in a way that the classes stay together in the same room and the teacher moves, the schedule is different every day, and not all the teachers or the…
jonsayer
  • 93
  • 1
  • 6
6
votes
1 answer

How to use PHP to annotate an string with HTML (i.e How. insert HTML tags to an string by offsets mantaining a valid HTML)?

I'm trying to add HTML tags between words inside a string (wrap words by html tags i.e. HTML annotations). The positions where the HTML tags should be written are delimited by an array of offsets, for example: //array(Start offset, End offset) in…
Martin
  • 1,282
  • 1
  • 15
  • 43
6
votes
1 answer

django annotate with dynamic column name

I have a model in django app, with the following structure: class items(models.Model): name = models.CharField(max_length=50) location = models.CharField(max_length=3) I wanted to create a pivot table for the count of each location per each…
Belhajio
  • 75
  • 1
  • 5
1 2
3
32 33