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
2 answers

how to automatically annotate point or line at certain xy values in loop

Hi I succeeded creating multiple figures of pressure and temperature, etc from excel data using for in loop and generate multiple png files. I attached the script below Is it possible to automatically create a line or annotation (red scratches)…
0
votes
1 answer

Seaborn annotate lineplot of projected world population

""" I'm trying to reproduce a plot showing the world population growth from 1950 to 2100. ideally, I'd like to show two different colors under the lineplot, darkgreen from 1950 to 2019 because these are actual data, and lightgreen for the projected…
Amilovsky
  • 397
  • 6
  • 15
0
votes
1 answer

Python plot error : annotate() got multiple values for argument 'xy'

In my plot, I am trying to annotate with multiple values at each point. weights = [np.array([w, 1-w]) for w in np.linspace(0, 1, 5)] mu = [0.5, 0.25] def portfolio_return(weights, returns): return weights.T @ returns rets =…
deb
  • 331
  • 1
  • 4
  • 13
0
votes
2 answers

Rails 3 annotate doesn't work

When I run annotate at the command-line, I get the following error: $ annotate /.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.7/lib/rails/application.rb:215:in `initialize_tasks': undefined method `task' for #
marcamillion
  • 32,933
  • 55
  • 189
  • 380
0
votes
0 answers

Can I use Annotate in ggplot2 to fill my violin graph?

I made a violin graph using rtruncnorm and a set of data and annotated it. This is my plot code: ggplot(g) + annotate(geom = "rect", xmin = -Inf , xmax = Inf , ymin = 0, ymax = 1, fill = "red", alpha= 0.4) + annotate(geom = "rect",…
0
votes
0 answers

Position Text with variable in scatterplot

I'd like to place some text in my scatterplot, which I made with ggplot like you can see in the top left corner of the plot: The text is now showing "Text" and "Variable", but should show more "Text" after the "Variable" and should be left…
EmKau
  • 91
  • 5
0
votes
2 answers

Rails Annotate Segmentation Fault

There are a handful of questions that sort of skirt around this question, but nothing that really gets to what I'm looking for. After I bundle install my Gemfile, listed below, I run annotate and come up with the following…
Nick Coelius
  • 4,668
  • 3
  • 24
  • 30
0
votes
1 answer

Add labels to scatter plot

I cannot seem to add labels to my scatter plot. I want to label the scatter with the variable states. It is currently not working either due to conflict with annotate or some other geom function. Here is my data: datatrials <- structure(list(states…
SamV
  • 118
  • 1
  • 7
0
votes
1 answer

How to fit the end of line labels when using ax.annotate?

I have this chart which I'm quite happy with except that I cannot fit 4 labels at the end of the lines and it does not look good when I am saving it as a pdf. I have already tried changing figsize to figsize=(9,6), and xy=(0.984,y) in ax.annotate…
Bluetail
  • 1,093
  • 2
  • 13
  • 27
0
votes
0 answers

Annotate based on calculation in ManyToManyField

I am trying to annotate a Django model by calculating a non-trivial expression using a property of a ManyToManyField in the model. The situation can be translated into the following simple example structure of "payments" that should be split between…
0
votes
3 answers

Django - aggregate fields value from joined model

my goal here seems to be simple: display the Sum (aggregation) of a foreign model particular field. The difficulty consist in the current set-up, kindly take a look and let me know if this need to be changed or I can achieve the goal with current…
Tizu
  • 25
  • 1
  • 6
0
votes
0 answers

Alternative for Annotate in Visual Studio 2010

Is there an alternative for Annotate in Visual Studio 2010? What is Annotate? http://msdn.microsoft.com/en-us/library/bb385979.aspx With Annotate you do not need anymore comment your whole code with information that does not belong to it.
Rookian
  • 19,841
  • 28
  • 110
  • 180
0
votes
1 answer

Django get annotated model fields

I have two models Player and Game class Player(models.Model): userId = models.CharField(max_length = 150, primary_key=True) username = models.CharField(max_length = 250) email = models.CharField(max_length = 150) playedGames =…
0
votes
1 answer

Error while running annonate function for grouped bar chart: annotate() got multiple values for argument 'xy'

I am using a dictionary "my_dictionary" containing key and a list containing two int items. Dictionary - {key : [men_mean, women_mean]}. Counts: Values of men_mean and women_mean are close to 2000. Total keys are 400. I am getting following…
usav
  • 1
  • 2
0
votes
1 answer

How do I return a list in a Django Annotation?

Right now I have the following, very slow but working code: crossover_list = {} for song_id in song_ids: crossover_set = list(dance_occurrences.filter( song_id=song_id).values_list('dance_name_id', flat=True).distinct()) …
Virgil
  • 3
  • 5