Skip to content

Tag: matplotlib

View Alaskan/East Siberian Side of Arctic in Cartopy

I have some points plotted on a NorthPolarStero map in Cartopy using the following code But I would actually like to plot just the top half of this image, like this: If I change the “`ax.set_extent“ line to either: [90, -90, 90, 66] or [-90, 90, 90, 66] It just gives me the bottom half of the plot…

Pyplot start x axis at negative values

I am trying to plot a piecewise function, but at the moment I am getting an error message when I try to start my x values at a negative. The code works fine if I run the following (albeit with only one part of the function): But when I change the first line to I get thrown the error message:

Matplotlib Contourf with Irregular Data

I have a soil property data with depth in different x points. The borehole data are not in equal depth or number, so I have to standardize the code. If all boreholes have same number of data and depth, no problem, np.meshgrid will work fine. However, in my case, I had a trouble and couldn’t manage to dr…

Matplotlib plot with ConnectionPaths objects layout issues

I have a script that plots point correspondences between images: This results with an overlap of the axes ticks of one image with the other. When I try to add fig.tight_layout() at the end of the script the image’s size is drastically diminished: Is it possible to keep the images large and avoid the tic…