Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bins must increase monotonically, when an array #2

Open
VLaraC opened this issue Nov 10, 2020 · 1 comment
Open

bins must increase monotonically, when an array #2

VLaraC opened this issue Nov 10, 2020 · 1 comment

Comments

@VLaraC
Copy link

VLaraC commented Nov 10, 2020

I'm trying to plot a histogram with two arrays, each one of it has 29.000 elements (aprox.), so those correspond [1, 29.000]
This is part of code to plot:

data = fits.getdata('C:/Users/VanesaLara/Desktop/SDSS/DB/DR12Q.fits', 1)
t = Table(data)
x = t['Z_VI']
y = t['BI_CIV']
plt.hist(x, y, 50, density=True, edgecolor='DarkCyan', histtype='step')
plt.title('Distribution BI')
plt.xlabel('Z_VI')
plt.ylabel('BI_CIV')
plt.show()

@ZNevzz
Copy link
Member

ZNevzz commented Nov 29, 2020

Hi Vanessa, if x is your data set, then range of y should lie within x as it is your bin value for histogram

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants