Category "matplotlib"

Making a plot that has an x-axis that has neg. values representing hours prior to the start of the event, then pos. values representing hours after

I'm not sure if my question makes sense, so apologies on that. Basically, I am plotting some data that is ~100 hours long. On the x-axis, I want to make it so t

Trying to find a graph in matplotlib

I have data that show the difference of temperatures from 1955 to 2020 from an average. I want to make a graph in matplotlib that looks like this: It shows tem

Python with matplotlib and tkinter is working but I don’t understand how

I’m writing a program to help me solve small puzzles, like Sudoku. I’m a newbie at Python and am just starting to use matplotlib and tkinter. I&rsqu

Disable the output of matplotlib pyplot

I have an array A of shape (1000, 2000). I use matplotlib.pyplot to plot the array, which means 1000 curves, using import matplotlib.pyplot as plt plt(A) Th

How to mark the maximum value and location of 4 equations in one plot (shear diagram - portal frame)?

I´m an mechanical engineering student and I'm trying to make a shear diagram of a portal frame. In the code below I want to identify for each equation (4

seaborn joint plot not working with logarithmic axes

I'm trying to plot via: g = sns.jointplot(x = etas, y = vs, marginal_kws=dict(bins=100), space = 0) g.ax_joint.set_xscale('log') g.ax_joint.set_ys

how to make the box in my boxplot bigger?(matplotlib)

I use the matplotlib boxplot and plotted this graph. My question is how can I make the box larger or make the y-axis interval wider?

Matplotlib PathPatch Colors and Legends not Matching

I have a dataset that is a list of lists. Each list is a category to be plotted as a box plot. Each list has a list of up to 9 components to be plotted into sub

Plotting Multiple Series of Lines on the Same Plot

I am attempting to graph battery cycling data similar to this . Each line is one cycle worth of datapoints and should be one line on the graph. At first the cod

How do I superimpose an image in the back of a matplotlib plot?

I'm trying to superimpose an image in the back of a matplotlib plot. It is being rendered as HTML in a flask website so I am saving the plot as an image before

Combining various image channels after gaussian filtering produces white image

I am trying to implement a gaussian filter for an image with dimensions (256, 320, 4). I first generated a gaussian Kernel for the same and then individually pe

How to plot a marker around eye region according to face landmarks of mediapipe Python

The question is how to find the eye coordinate using the multipipe library and place a marker at the left,right, top, and bottom of each of the eyes using cv2 l

Plot variant abundance vs. time (e,g, of mutant strains) in python

Given [absolute] numbers for each of a number of variants over time, I would like to produce a plot like the following: Is there a function for this in Python

How to create a comparison plot from an Excel file with many worksheets

I want to create a plot that will have in the x axis the months and for each country it will show the Orders per month. Attempting to create a function that rea

Why converted images now shown as grayscale?

I am working on image compression problem, i want to convert the images from 3 channel to 1 channle , i used tf.image.rgb_to_grayscale(img_data_array, name=None

how to plot pairs in different subplots with difference on the side

I want to make a plot in seaborn but I am having some difficulties. The data has 2 variable: time (2 levels) and state (2 levels). I want to plot time on the x

Setting X axis label name more frequently in Matplotlib

I have a dataframe like this Time(DDHHMM) True AOG Predicted AOG 5184 28:0:0.0 4.0 4.697324 5185 28:0:5.0 10.0 0.366948 518

How to add title to the plot of shap.plots.force with Matplotlib?

I want to add some modifications to my force plot (created by shap.plots.force) using Matplotlib, e.g. adding title, using tight layout etc. However, I tried to

Insert a png image in a matplotlib figure

I'm trying to insert a png image in matplotlib figure (ref) import matplotlib.pyplot as plt import numpy as np from matplotlib.figure import Figure from matplo

Matplotlib control text properties for legend title

I have a matplotlib plot with a title in the legend and the properties of the title text I want to control, like the font family size etc. import numpy as np