All Questions
738
questions
0
votes
1
answer
47
views
Showing one x tick per month on a pandas plot
I have a time series with daily data, that I want to plot, and only plot a x-tick every month. I have tried multiple approaches (including the ones described here, but it seems that pandas considers ...
0
votes
0
answers
30
views
NaN values on my bar chart x axis, removing with .notna() is creating empty space along axis
I am trying to create a bar chart representing positive and negative percentage values. I don't have any empty values in my CSV file:
When I write the following code I get an output with several nan ...
2
votes
1
answer
32
views
Creating multiple pie/bar charts from pd.dataframe, finding column with max and min values
My dataframe looks like this, and i'm now looking for appropriate analysis techniques, i'm hoping some people on here could give me some advice on either creating graphs from this dataframe, or ...
1
vote
1
answer
45
views
How to count the values to prepare make stacked bar chart
I'm wondering how to count the values in a column to make a stacked bar chart
For example, the data is like below
I'd like to make a stacked bar chart with x="Main", which has the "...
0
votes
2
answers
92
views
How to barplot a grouped dataframe with three axes?
I have a grouped dataframe with three columns: timestamp, category, and values. I have grouped the dataframe by timestamp and used it as an index. I would like to plot values of categories stacked ...
0
votes
1
answer
64
views
add another column as second X axis label in Python
I have a 15minutes interval time series for several camera. each camera can collect 3 types of movement in four different leg. There is a control_factor that was present for an hour for each camera. I ...
0
votes
0
answers
30
views
Python Bar Chart Reordering Y Axis
I can't seem to re-order the Y axis on my graph. I want it to start with the smallest percent and have the largest on the top. It originally also appears upsidedown so I had to flip it.
Does anyone ...
1
vote
1
answer
33
views
How to create zoomed plot window inside a main plot in python?
I would like a figure similar like this
Here is my data. Any sort of help highly appreciated.
Model
RS
GS
BO
TPOT
OPTUNA
RF
0.8
0.81
0.82
0.91
1.35
XGB
0.45
0.37
1.65
0.63
0.2
SVR
1.59
1.59
1.65
0....
0
votes
1
answer
68
views
Plotting extreme negative and positive values
I have a dataframe with three values, i would like to plot as a bar chart. I am having an issue with extreme values, I tried taking a log, but it can't handle negative values, can you please help me ...
0
votes
2
answers
2k
views
How to color all bars in all subplots based off a name
The goal is to mark every bar with '?' in a color different from the rest. A similar problem was already asked before, but it does not solve the problem I am facing here.
How to color a single bar ...
0
votes
1
answer
307
views
Keyerror : 'count'
I want to plot a interactive bar plot using plotly.express
state_count = df['state'].value_counts().head(10)
state_names = df['state'].value_counts().head(10).index
Bar_plot = px.bar(df,state_names,...
-1
votes
1
answer
89
views
Line plot doesn't align with corresponding bars [duplicate]
I'm trying to make a bar chart with a line plot, but the line plot is starting from 2 instead or 1.
import pandas as pd
url = 'https://raw.githubusercontent.com/Arancium98/datasets/main/...
2
votes
1
answer
263
views
How to bar plot the top n categories for each year
I am trying to plot a bar graph which highlights only the top 10 areas in Auckland district by the money spent on gambling. I have written the code to filter for the top 10 areas and also plot a bar ...
3
votes
1
answer
83
views
How to resolve issues with a bar plot x-axis being overcrowded
Here's a Python program which does the following:
Makes an API call to treasury.gov to retrieve data
Stores the data in a Pandas dataframe
Plots the data as a bar chart
import requests
import pandas ...
0
votes
1
answer
149
views
Unable to change barplot width [duplicate]
I have the following code trying make a bar plot in python using seaborn, based simply on a two-column dataframe, with a "Category" column, and "Value" column with float values:
...