Skip to content

Tag: matplotlib

Plotting different shape 2D arrays in matplotlib

I couldn’t find any answer to this specific case. Say I want to create a scatter plot from the following data: Where all the values of y[0] are the correseponding values of X[0] (86) and so on. I know I can just use numpy repeat function but I thought maybe there’s any other more feasilbe option? …

Convert x-axis from days to month in matplotlib

i have x-axis which is in terms of days (366 days Feb was taken as 29 days) but instead I want to convert it in terms of months (Jan – Dec). What should i do… Answer I think the quickest change might be to just set new ticks and tick labels at the starts of months; I found the conversion