Skip to content

Tag: matplotlib

How to get the x and y intercept in matplotlib?

I have scoured the internet and can’t find a python command to find the x and y intercepts of a curve on matplotlib. Is there a command that exists? or is there a much easier way that is going over my head? Any help would be appreciated. Thanks, Nimrodian. Answer

Adjusting gridlines and ticks in matplotlib imshow

I’m trying to plot a matrix of values and would like to add gridlines to make the boundary between values clearer. Unfortunately, imshow decided to locate the tick marks in the middle of each voxel. Is it possible to a) remove the ticks but leave the label in the same location and b) add gridlines betwe…

Why is matplotlib’s notched boxplot folding back on itself?

I tried to make a notched boxplot using matplotlib, but found the notched box tends to overextend and then fold back on itself. This does not happen when I make a regular boxplot. This can be seen with the following code and the resulting plot that gets generated: Does anyone know what I’m doing wrong a…