Skip to main content

All Questions

Tagged with
1 vote
1 answer
78 views

how to display metadata in scatter plot in matplotlib?

I have a scatter plot. I want to add some metadata to each point in my scatter plot. looking at documentation , i found annotate function( matplotlib.pyplot.annotate) , has anyone use this or some ...
no_reservations's user avatar
0 votes
0 answers
95 views

Same python script generates different plot for "similar" csv files

I had prepared a python script to generate some automatic plots from some csv files. But recently I came across an issue when passing one of the newer csv files, and generated plots change a lot. ...
Inc0gnito's user avatar
1 vote
0 answers
58 views

Python - XYZ plot coloring cluster region

Current this is my code for XY axis: import numpy as np import matplotlib.pyplot as plt def plot_with_tricontourf_customized(dfs, figures_organizer, figsize_setting, list_points_mean, ...
PTQuoc's user avatar
  • 1,093
0 votes
1 answer
54 views

Matplotlib Plotting repeating steps in x axis

I have a dataframe like the following: ID Parm_1 Parm_2 Result 0 100 100 0.2 1 100 200 0.4 3 100 300 0.9 4 100 400 0.45 5 ...
pb.'s user avatar
  • 135
1 vote
1 answer
76 views

plotting vertical lines on pandas line plot with multiindex x axis

I have a dataframe whose index is a multiindex where axes[0] is the date, and axis[1] is the rank. Rank starts with 1 and ends at 100, but there can be a variable number of ranks in between as below. ...
dayum's user avatar
  • 1,105
0 votes
1 answer
77 views

Manipulate data in a DataFrame

I am very new to Python, so please bear with me. I have this dataframe called df_staging (sample image) that summarizes the annual sales and income for multiple counties (A1,A2,A3,A4,etc.). I want to ...
Kendo96's user avatar
  • 15
0 votes
1 answer
44 views

To plot variable number of plots with variable number of graphs from Pandas grouped by some columns

I've been dealing with Python for the last few months and it still a little bit irritate me :) But hope someone can explain how to plot some subplots from dataframe grouped by 2 columns using ...
Nakira 's user avatar
1 vote
2 answers
70 views

Sorting axis in pandas plot

How can I sort the axis in descending order? I tried the following and it did not work: from io import BytesIO from fpdf import FPDF import pandas as pd import matplotlib.pyplot as plt import io DATA ...
smpa01's user avatar
  • 4,346
9 votes
3 answers
435 views

How to plot polygons from categorical grid points in matplotlib? (phase-diagram generation)

I have a dataframe that contains 1681 evenly distributed 2D grid points. Each data point has its x and y coordinates, a label representing its category (or phase), and a color for that category. ...
Shaun Han's user avatar
  • 2,797
3 votes
1 answer
45 views

Conditional plotting in python based on numerical value

I am trying to plot geochemical values and my data is in a dataframe with columsn such as "Pt", "Pd", "Cu" etc, I am trying to plot the Cu/Pd ratio of a df against the Pd ...
Anna Morrison's user avatar
1 vote
0 answers
57 views

Pandas plot or matplotlib first plot very slow

Why is it that the first plot processed by Matplotlib or pandas df.plot runs extremely slowly compared to all subsequent plots. This even occurs when the subsequent plots use completely different ...
1TonDan's user avatar
  • 95
0 votes
2 answers
58 views

Crashing matplotlib with special chars in strings

matplotlib crashes when a Pandas Serie contains specific special chars in a string, in my case $$. import matplotlib.pyplot as plt import random import pandas as pd list_= 'abcdefghijklmnopqrstuvwxyz' ...
Jb Drucker's user avatar
1 vote
0 answers
73 views

Issue with histogram creation

I have a problem with a histogram code.Sorry if the question is simple I am new I have this table: And a file directory with files in this format: en_Brain_Amygdala.db_brain_predict_1000....
Evangelia146's user avatar
0 votes
1 answer
38 views

Python + Seaborne line chart extremes and normal values legible?

So I've been working with a LOT of data, but for simplicity we can use the sample data below. However, what I'm trying to do is plot a line chart that will let me see the extremes, compress the Y axis ...
Ryan Barnes's user avatar
0 votes
1 answer
65 views

How can I run a code where I can plot and save multiple hours of the latest GFS model run?

I want to plot precip type from the start of the GFS run (hour 0) through hour 240 at 6-hour intervals. (in this code I only try to go to hour 108) Also, at the end of the code when saving the the ...
Matthew Labenz's user avatar

15 30 50 per page
1
2 3 4 5
669