Questions Tagged [Matplotlib]

Questions Tagged [Matplotlib]

Matplotlib is a plotting library for Python which may be used interactively or embedded in stand-alone GUIs. Its compact "pyplot" interface is similar to the plotting functions of MATLAB®.

65,665 questions
0 votes
1 answer
9 views

Strongly type array (numpy.ndarray) of matplotlib Axes from plt.subplots()

I wanted to have no errors while using VSCode Pylance type checker. How to type the axs correctly in the following code: import matplotlib.pyplot as plt fig, axs = plt.subplots(2, 2) In the image ...
  • 491
0 votes
0 answers
11 views

grouped box plot with index in python [duplicate]

python: I want to draw a box plot in python using this data frame and looks like the draft(sorry for the poor drawing). x-axis: MAE etc. all error name, y-axis: error number, two groups: type (...
  • 11
0 votes
0 answers
8 views

Sharing axis zoom, not subplots

If I have two plots: f1,ax1 = plt.subplots() f2,ax2 = plt.subplots() I can link their zooming like this: ax1.get_shared_x_axes().join(ax1,ax2) ax2.get_shared_x_axes().join(ax1,ax2) And the zooming ...
  • 1,799
0 votes
1 answer
15 views

I have a table with 50+ columns - 1 for each year. How can I reshape the table so that the data points for each year are all in the same column?

I'm relatively new to python and having an issue that I cannot wrap my head around. I have a collecting of economic indicators that I am looking to analyse for correlations vs certain events. I am ...
0 votes
0 answers
14 views

Compare two arrays on a graph

I have two two-dimensional arrays with data, these arrays have the same dimension. Arrays are saved to a file .CSV Example of an array: delimiter - ; Could you tell me please, how can I use some ...
0 votes
0 answers
9 views

Matplotlib make space for y axis

I hope you are all doing well. How can i make space for the y axis value 'TomTom' in order to be shown fully in the figure.
1 vote
0 answers
8 views

Is there a way to save a Python plot as a FITS file?

As the question above reads, I'm trying to save a Python plot I made as a FITS file. When I right-click on the plot and try to click "save image as", the only option for the file format is a ...
0 votes
0 answers
11 views

How do I correctly implement contours of histograms with logscale binning in numpy/matplotlib

I am trying to plot contours of data that his been binned using numpy.hist2d, except the bins are set using numpy.logscale (equal binning in log space). Unfortunately, this results in a strange ...
-1 votes
0 answers
9 views

How to create a colour dict of length n for graph plot?

I am trying to generate a colour map (cmap) of length n - that is according to length of my key values: 31. The keys range from 0 - 31. I wish to colour particular points in my networkx plot as below:...
0 votes
0 answers
20 views

Trying to get the current FPS and Frametime value into Matplotlib title

I try to turn an exported CSV with benchmark logs into an animated graph. Works so far, but I can't get the Titles on top of both plots with their current FPS and frametime in ms values animated. ...
0 votes
1 answer
17 views

How to calculate upper and lower values of bins of equal density histogram?

I have a range of positive integers ranging from 250-1200, with a normal distribution. I have found the answer to creating bins of equal density (Matplotlib: How to make a histogram with bins of equal ...
2 votes
1 answer
23 views

Geopandas generate empty plot

I am following a tutorial . Basically, I want to plot the image values from a raster formatted 40 band image in scope of the ground-observation data points (shapefile). But when I try to plot it gives ...
-1 votes
0 answers
10 views

Multiple Plot Using Matplotlib and Tkinter Issue

I'm trying to draw a live plot which update every 60s with the Funcanimation function in matplotlib and at the same time plotting a pie chart, all of these embedded in the tkinter environment in the ...
-1 votes
3 answers
15 views

Python chart using matplotlib and pandas from csv does not show all x-axis labels

pls consider me as newbie in python. I got to chart a data from csv somewhere from my directory. I using python by learning some samples online. Problem is, i cant find any solution to show all x-axis ...
0 votes
0 answers
7 views

Rendering a map under the grid on x-y plane in a 3D slice plot with python

I'm currently working on combining 2D contour plots to build a 3D plot in one figure. I would like to add a map under the x-y plane grid to visualize the dataset's position. Is this possible in some ...

15 30 50 per page
1
2 3 4 5
…
4378
James H. Sterling
Author

James H. Sterling

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.