Skip to content
Advertisement

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 between the pixel boundaries? Image

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 and how I can fix

Matplotlib boxplot visual styles: `whiskerprops` does not work

In the documentation of matplotlib’s boxplot we can read: whiskerprops : dict or None (default) If provided, will set the plotting style of the whiskers Ok, so I passed a dict to set some visual styles on the whiskers: The settings have no effect, except the color. Same behaviour could be observed at the other props: capprops, medianprops, boxprops, etc.

Advertisement