Skip to content
Advertisement

Tag: matplotlib

Mixing horizontal and vertical ticks

I have the example plot shown below. How can I make the first and third x-axis tick horizontal and the second and fourth tick vertical? Answer Not sure if there is an automate way of doing it, but you can do it “manually” for each tick: Every item of the ticks_labels list is a Text artist, so you can change

How to save a full size image with RGB and float32?

I have an image array with RGB, np.float32, and values in the range of 0 … 1. When I multiply the array with 255, and use cv2.imwrite, the output is not correct. When I use plt.imshow(img.astype(np.float32)), the output is right, but the image size is too small. How can I output a good image? Answer The common JPEG format doesn’t

matplotlib “fail to allocate bitmap” after some iterations

I can’t find a solution to avoid this crash. I have cleaned up the attached code because it contains the issue and nothing else. Regardless of the size of the image, the program crashes after 368 iterations. I also tried what I could find in the forums but no solution found ( plt.close(‘all’), gc. collect()…. ). Answer According to this

Draw scatterplots on different plots

I have a custom function that creates a scatterplot: The idea is to get a scatterplot that has x errors and y errors on it, as well as a color scheme based on a different column. I’ve noticed that if I were to do use d1 (of 5 points total) like this: And then another d2 (of 5 points total)

Conformal plotting python

I’m working on the joukowsky transformation for plotting airfoils and I’m trying to do so with python. The conformal mapping should be pretty straight forward but can’t seem to find a guide on how to approach the problem on python. by the math: According to the theory, by plotting z i should get a circle on that plane and by

Function plotting with matplotlib

I am trying to model an equation that depends on T and parameters xi, mu, sig. I have inferred parameters and spread(standard deviation) of those parameters for different durations (1h, 3h, etc). In the example code the parameters are for 1h duration. I need to create a forloop to create a cloud of zp with the array of xi, mu

Advertisement