Category "matplotlib"

Stacked bars are unexpectedly annotated with the sum of bar heights

My data: names_col = ['Count','Freq'] dat = [['Matching', 56935],['Mismatching', 100587]] plot_df = pd.DataFrame(data=dat,columns=names_col) I trying plot stac

Getting Errors when combining Bar graph with line plot in Sea born [duplicate]

I am trying to combine a bar chart(with hue) and line plot (with hue). I am able to plot them separately. But together, I get some garbage gra

Bind event to click on plot in tkinter canvas

I can bind a click event to a plot (i. e. to print the coordinates that were clicked) like so: from matplotlib.backend_bases import MouseButton import matplotli

change seaborn scatter plot legend from number to text

Here is how I plot the decision boundary of my SVC` classifier. X, y = make_classification(n_samples=100, n_features=2, n_redundant=0, n_clusters_per_class=

Polygonal scatter diagram with python

I have a matrix of N observations and F features. Among the N observations, 5 represent reference samples that I wish to compare with others (with distance or s

coloring lines generated from numerical points

I calculate the eigenvalues of large matrices depending on a parameter and would like to plot the eigenvalues in different colors. So I do not have functions wh

Solve linear Inequalities

I want to solve a system of inequalities A x <= b, namely to visualize the set of solutions of this system. Are there any ways to do this in Python? The solu

are contour data (X,Y) ordered in a connected clockwise path in matplotlib?

As in the title: pl = plt.contour(X,Y,Z,levels=[0]) paths = pl.allsegs I wonder how are the data points in paths ordered. Specifically is it oriented clockwis

Connect lines in plot

I have a plot with the numbers 1-9 on the y axis. I have a data frame (gaze data) with numbers in this range over time. ex: 333337777772221115556668888

Reordering the high-level clusters from seaborn clustermap results

Is there a way to get from a to b in the following figure with scripting? I am using seaborn.clustermap() to get to a (i.e. the order of the rows are preserved.

x and y must be the same size

Using python I'm trying to plot a sin wave and random distribution, then show where the ratio is greater than or equal to 3. I think I'm 90% of the way there bu

Python scatterplot clustering

I have many scatterplots, that show subsequent events in time (i uploaded two pictures).I would like to separate these clusters of points and find their center

plot barplot from nested dictionary using matplotlib

I have a nested dict that looks like this. {A: { 'apples': 3, 'bananas':5, 'oranges':6, 'kiwis':9}, B: { 'apples': 1, 'ban

matplotlib plotting is not working in google colab

I wanted to use matplotlib in colab but it didn't work. As this link says I tried both %matplotlib inline and %matplotlib notebook but they both didn't work. Bu

Draw relation in matplotlib [closed]

I have a relation such as 'x^3 + y^3 + z^3 - c = 0'. c is constant and would be any number, and of course the equation may be changed. How can

How to plot data from UDP stream coming from F1 2019 game, my lineplot comes up blank

I have this below code in which I am getting data packets from UDP from the game. However, when running this code I am getting a blank plot, I want to plot Spee

Display count on top of seaborn barplot

I have a dataframe that looks like: User A B C ABC 100 121 OPEN BCD 200 255 CLOSE BCD 500 134 OPEN DEF 600 1

Python, Spherical Plot- Color Scaling

I'm pretty new with python. For the past two days I have been trying to figure out how to scale the color of a 3d plot (Antenna Radiation Pattern) with matplotl

SymmetricalLogLocator not working with Contourf in Matplotlib

I have data in which values are ranging from small negative values to positive 1000. Since the minimum and maximum differ by large scales, I first set locator a

FileNotFoundError: [Errno 2] No such file or directory: 'latex': 'latex' (Python 3.6 issue)

I'm trying to use the latex interpreter for figure labels. I generate my figures using the matplotlib library. I am having trouble finding an answer to this co