Highlight specific sample in stripplot from pandas dataframe

I have a pandas dataframe as the following (although with more rows and columns): Index LOC1 LOC2 LOC 3 A 0.054 1.2 0.00 B 0.38 3.89 0.027 C 3.07 2.67 1.635 D 7.36 6.2 0.23 I was wondering if it’…

How can I plot a secondary y-axis with seaborn’s barplot?

I’m trying to plot the data (see below). With company_name on the x-axis, status_mission_2_y on the y axis and percentage on the other y_axis. I have tried using the twinx() fucntion but I can’t get …

How to plot a bar-plot with only one bar colored?

name grade chandler A joey B phoebe B monica C ross A rachel B mike C gunther A import pandas as pd import matplotlib.pyplot as plt import seaborn as sns class2 = [[‘chandler’,’A’], …

Matplotlib stacked histogram numpy.ndarray error

I am trying to make a stacked histogram using matplotlib by looping through the categories in the dataframe and assigning the bar color based on a dictionary. I get this error on the ax1.hist() call. …

Plot multiple columns of dataframe in multiple plots (Python)

i want to plot multiple columns from a dataframe in multiple plots. My code looks like this: fig, axs = plt.subplots(6) axs[0].plot(data.Date,[data[aapl],data[‘High_’+aapl],data[‘Low_’+aapl]]) axs[1]….

Python: Add dynamic text in Matplotlib animation

I made an animation from the list of images saved as numpy arrays. Then I want to add a text onto the animation like like a subtitle whose text changes for each frame but placing plt.text(some_string) …

Rearrange elements in numpy array to plot a 3d array in 2d, preserving grouping

Hello I have a 3d numpy array of shape (nc, nx, ny). I would like to plot it (with matpoltlib) using x and y as the axis, but in such a way that all c values are close to each other and arranged in a …

Export huge seaborn chart into pdf with multiple pages

I created a program which generates a large number of chart using seaborn catplot. This is the example of my code with the illustration of how the final chart looks like. plot= sns.catplot(data=df3, x=…

Is there a MatLab equivalent of Python matplotlib’s tight_layout()?

I find the amount of whitespace around plots in both normal Python Matplotlib and Matlab quite annoying, specifically the left and right margins that make your plot look tiny when inserting the saved (…

How can I make a command in discord.py that can print the graph of a linear equation?

import discord from discord.ext import commands import matplotlib.pyplot as plt class Equations(commands.Cog): def __init__(self, client): self.client = client def plotlineareq(a, b,…