plot-annotations Questions

3

Solved

I have a boxplot generated with matplotlib: However, I have no idea how to generate the legend. I get a warning saying: Legend does not support handles for dict instances. or No artists with la...
Chema asked 28/11, 2017 at 10:13

6

Solved

In Matplotlib, it's not too tough to make a legend (example_legend(), below), but I think it's better style to put labels right on the curves being plotted (as in example_inline(), below). This can...

2

Solved

I solved a problem that I couldn't find on stackoverflow, so I decided to upload it for others that encounter the error. I have a set of functions to create a video from different plots. I use thi...
Luxate asked 27/8, 2019 at 12:38

2

Solved

My data frame looks like below: Airport ATA Cost Destination Handling Custom Total Cost PRG 599222 11095 20174 630491 LXU 364715 11598 11595 387908 AMS 401382 23562 16680 441623 PRG 5...
Novellanovello asked 24/7, 2018 at 10:11

3

I need to annotate a pylab rectangle with few data lines - which are of different length. Searching through the matplotlib documentation, and Googling, I could not find a way to give different part...
Aalesund asked 1/2, 2013 at 10:8

3

Solved

I'm creating a heatmap from a pandas pivot_table as below: table2 = pd.pivot_table(df,values='control',columns='Year',index='Region',aggfunc=np.sum) sns.heatmap(table2,annot=True,cmap='Blues') I...
Caveat asked 15/4, 2015 at 10:25

6

Solved

How can I annotate a range of my data? E.g., say the data from x = 5 to x = 10 is larger than some cut-off, how could I indicate that on the graph. If I was annotating by hand, I would just draw a ...
Koblenz asked 22/8, 2013 at 16:34

2

Solved

I have a collection of binned data from which I generate a series of seaborn pairplots. Since all of the bins have the same labels, but not bin names, I need to annotate the pairplots with the bin ...
Publicly asked 9/9, 2015 at 13:41

5

I use matplotlib to plot a scatter chart: And label the bubble using a transparent box according to the tip at How to annotate point on a scatter automatically placed arrow Here is the code: if sh...
Reconstructive asked 18/2, 2013 at 14:24

4

Solved

I want to annotate the bars in a graph with some text but if the bars are close together and have comparable height, the annotations are above ea. other and thus hard to read (the coordinates for t...
Nevadanevai asked 13/1, 2012 at 11:51

4

Does anyone know of an easy way to expand the plot area to include annotations? I have a figure where some labels are long and/or multiline strings, and rather than clipping these to the axes, I wa...
Zeph asked 18/7, 2012 at 15:37

1

I'm writing type annotations for some functions and I couldn't find the best way to annotate an argument which is expected to be of type matplotlib.axes._axes.Axes. I'm not even sure if I'm doing t...
Kuchen asked 17/11, 2020 at 17:31

2

Solved

I have an issue that matplotlib appears to not be following the rcparams. This occurs particularly for text: annotations, axis labels, titles, etc. I will note that I am not running Seaborn at the ...
Disproportion asked 25/7, 2021 at 9:12

3

Solved

I'm trying to annotate the values for a stacked horizontal bar graph created using pandas. Current code is below import pandas as pd import matplotlib.pyplot as plt import numpy as np d = {'group...

2

Solved

Here's my current code values = pd.Series([False, False, True, True]) v_counts = values.value_counts() fig = plt.figure() plt.pie(v_counts, labels=v_counts.index, autopct='%.4f', shadow=True)...
Appreciable asked 8/1, 2020 at 11:21

11

Solved

I generated a bar plot, how can I display the value of the bar on each bar? Current plot: What I am trying to get: My code: import os import numpy as np import matplotlib.pyplot as plt x = [u'I...
Cardiff asked 14/5, 2015 at 1:55

4

Solved

I use a bar graph to indicate the data of each group. Some of these bars differ significantly from each other. How can I indicate the significant difference in the bar plot? import numpy as np imp...
Cavy asked 17/7, 2012 at 7:38

3

I am trying to annotate text in plots so that they follow the curvature of the line. I have the following plot: And this is what I want to obtain, if I fix a particular y value for the annotatio...
Arteaga asked 21/4, 2015 at 7:14

1

Solved

I have the following snippet of code to draw a best-fit line through a collections of points on a graph, and annotate it with the corresponding R2 value: import matplotlib.pyplot as plt import nump...
Weariful asked 15/2, 2022 at 13:59

3

I use python3, seaborn countplot, my question : how to add the count values for every bar? Show the label at the top of each bar? how to have these bars in descending order? I wrote this:...
Isocyanide asked 1/3, 2018 at 6:54

1

Solved

As of matplotlib 3.4.0, Axes.bar_label method allows for labelling bar charts. However, the labelling format option works with old style formatting, e.g. fmt='%g' How can I make it work with new st...
Play asked 23/1, 2022 at 21:15

2

Solved

I'm struggling to create a stacked bar chart derived from value_counts() of a columns from a dataframe. Assume a dataframe like the following, where responder is not important, but would like to st...
Horsecar asked 29/12, 2021 at 17:31

1

Solved

I have been using the ax.bar_label method to add data values to the bar graphs. The numbers are huge such as 143858918. How can I add commas to the data values using the ax.bar_label method? I do k...
Caveator asked 29/12, 2021 at 5:42

1

Solved

I have a dataframe dictionary like this {'region': {0: 'R0',1: 'R1',2: 'R2',3: 'R3',4: 'R4',5: 'R5',6: 'R6'}, 'DT': {0: 0.765, 1: 0.694, 2: 0.778, 3: 0.694, 4: 0.629, 5: 0.67, 6: 0.668}, 'GB': {0...
Goldia asked 13/12, 2021 at 11:8

2

Solved

My data: names_col = ['Count','Freq'] dat = [['Matching', 56935],['Mismatching', 100587]] plot_df = pd.DataFrame(data=dat,columns=names_col) I trying plot stacked catplot with showing values , the...
Folly asked 8/12, 2021 at 7:30

© 2022 - 2024 — McMap. All rights reserved.