The dataframe is a snapshot of what I'm working with. What I want to achieve is a line chart of the monthly sales of the different brands. Months with '-' befor
I am currently leveraging Matplotlib to generate a variety of graphics and want to use a series of custom fonts. I am specifically using the Milliard font packa
I want to map each numpy array to a color to create an image. For example: if I have the numpy array: [ [0 0 1 3] [0 2 4 5] [1 2 3 6] ] I want to make an ima
There is a problem with plt.legend in seaborn and matplotlib. What is wrong with it? I can't see the legend color. plt.figure(figsize=(30,10)) plt.xticks(rotati
I was looking for a way to annotate my bars in a Pandas bar plot with the rounded numerical values from my DataFrame. >>> df=pd.DataFrame({'A':np.rand
I have plotted an image with matplotlib and changed the background facecolor to gray, however there is this white border line around the background. I have trie
I would like to plot a relatively simpler bar chart but struggling to plot using Matplotlib. Could I get some help please. I would like to prepare a chart as sh
hi can anyone tell me why my linear regression line is being displayed like https://imgur.com/gallery/u3L2avz. i reverted back to a previous version of my pytho
I want to get a picture like this (just focus on the boxplots): As you can see the x-labels of the picture represent the average spacing of the boxplot. I'm tr
I expose the problem quickly: I have to create 3 classes. X Y and Z, inside X y and z are initialized as variables of class x but not as objects Y and Z. What i
I have a list of polygon's corners points (polygon) and a list of x,y points (points). when I do mpltPath.Path(polygon).contains_points(points) I get a list of
import numpy as np import math as mt import matplotlib.pyplot as plt import mpl_toolkits.mplot3d.axes3d as axes3d #############################################
I've recently updated some code which worked in python2 to python3 and encountered an error using reportlab in conjunction with pdfrw and matplotlib imshow(). C
I have the following image I find the contour using contours, hierarchy = cv2.findContours(thresh, cv2.RETR_LIST, cv2.CHAIN_APPROX_NONE) contour = contours[0]
I'm creating a fairly small plot with matplotlib which needs to include a certain legend. However, while space is tight, for some reason matplotlib makes the le
I would like to have a plot where the font are in "computer modern" (i.e. Latex style) but with x-ticks and y-ticks in bold. Due to the recent upgrade of matp
The snapping cursor when plotted starts at (0,0) making my graph very small. It's doing this Instead of this I think that the code is made so that initially the
my code: from keras.preprocessing.image import load_img, img_to_array from keras.preprocessing.image import smart_resize import numpy as np #load pretrained mo
For plotting data I have created the Figure. figure Is there a possibility to reduce the horizontal and vertical distances between the subplots and the vertival
Actually plotting this image using plt.imshow and np.masked to plot the figure in blue. I would like to remove the inner part of the figure and just leaving the