Skip to main content

All Questions

-1 votes
1 answer
354 views

How to plot a stacked bar using the groupby data from the dataframe in python?

I am reading huge csv file using pandas module. filename = pd.read_csv(filepath) Converted to Dataframe, df = pd.DataFrame(filename, index=None) From the csv file, I am concerned with the three ...
sodmzs's user avatar
  • 194
0 votes
0 answers
69 views

How to plot figures inside a table

In some research papers, I often met some elaborate visualization which combining the advantages of figures and tables. An example I clipped from paper here is as follows: The ...
Han Zhengzu's user avatar
  • 3,852
1 vote
1 answer
199 views

Matplotlib: how to have aligned texts on multiple rows

Given the following not so serious code: import numpy as np import pylab import matplotlib.pyplot as plt from datetime import datetime franco = [0.18, 0.72, 0.25, 0.62, 0.14, 0.41, 0.94, 0.94, 0.13, ...
Andrea Ianni's user avatar
1 vote
1 answer
964 views

Plotting data points onto matplotlib Basemap in Jupyter Notebook

Link to full code I am able to successfully create a Basemap of the US within a Jupyter Notebook complete with shapefile, coloring, and borders in Cell 4. I am trying to plot many data points onto ...
Alex's user avatar
  • 185
0 votes
2 answers
3k views

How to visualize binary data in multiple axis in Python?

I have a sample Pandas data frame as follows: Action Comedy Crime Thriller SciFi 1 0 1 1 0 0 1 0 0 1 ...
raja's user avatar
  • 450
1 vote
1 answer
1k views

Python Bar Chart not Displaying Correctly (Matplotlib)

I have some data I'd like to display in 2 stacked bar charts (side by side). Using matplotlib. keys=['BF', 'VL', 'GM', 'VM'] data=[[0.10992407597195027, 0.084754817342900857], [0.20119173770112833, ...
David Ferris's user avatar
  • 2,355
0 votes
1 answer
452 views

How Can I merge 9 sns.displot() pictures into 1 picture?

I want to use sns.displot() to plot 9 features's distribution. And I want to merge these 9 pictures into 1 picture to show them clearly. I tried to use name = ['active_users','download','hot_songs','...
nick_liu's user avatar
  • 425
3 votes
1 answer
2k views

How to color points base on other values in matplotlib?

I have some data that looks like this: (4,120,507.0),(6, 37, 7012.0),etc The first two is the coordinates, another is the values. I've drawn a scatter plot based on these coordinates. So how can I ...
dlwlrma's user avatar
  • 828
10 votes
2 answers
11k views

How to draw rectangle outside of the plot frame in Matplotlib

I want to generate the subfigure's title in the style of followed figure: A gray box should be beneath the title which are at the top of the scatter point. Here is the code I have tried: x = random....
Han Zhengzu's user avatar
  • 3,852
1 vote
1 answer
7k views

Matplotlib Bar chart with different color bars and bar showing values

I want to change the color of the bars in this code all the bars are of same color and I want to show different values on top of each bar which are stored in maxtweet,p,n variables. x=[] x.append(...
IFfy KhAn's user avatar
0 votes
1 answer
51 views

Legends do not get displayed

The legends of the black and red graph are not getting displayed years = [1950, 1960, 1970, 1980, 1990, 2000, 2010] gdp = [300.2, 543.3, 1075.9, 2862.5, 5979.6, 10289.7, 14958.3] gdp_half = [150.1, ...
Aswitha Visvesvaran's user avatar
0 votes
1 answer
604 views

Matplotlib: align xtick labels

I have generated the following plot using the code below. I would like to position the xtick labels at appropriate place. Currently, it is misleading and the first label 12/06 is missing. The code is ...
chintan s's user avatar
  • 6,488
2 votes
1 answer
8k views

Matplotlib : Could not convert string to float

I am trying to plot informations from this DataFrame : sold not_sold success_rate category PriceBucket PriceBucketTitle Papeterie 0 ...
Arij SEDIRI's user avatar
  • 2,158
-1 votes
1 answer
814 views

"Radial grids must be strictly positive" error on radar chart

Whilst plotting my complex radar chart, I am getting the error "radial grids must be strictly positive", but all of the values and ranges I have used in my radar chart are all positive. Can someone ...
Ibracadabra's user avatar

15 30 50 per page