GLIMS-RGI / rgitools

Processing files from the Randolph Glacier Inventory
http://rgitools.readthedocs.io
BSD 3-Clause "New" or "Revised" License
15 stars 9 forks source link

The columns of hypso_df from the tool of glacier hypsometry need a sort. #19

Open rylanlee opened 4 years ago

rylanlee commented 4 years ago

If there is a valley between glaciers distribution regions, the column of hypso_df in the example of glacier hypsometry will be out of order, which result in the yaxis of the figure in chaos.

In my opinion, add a step of sorting before the plot :

hypso_df = hypso_df.reindex(sorted(hypso_df.columns, key=int), axis=1)

fmaussion commented 4 years ago

Thanks! Sorry I missed this earlier. Would you like to open a pull-request?

rylanlee commented 4 years ago

OK. Please give me some time to know well about github.

fmaussion commented 4 years ago

I'm a bit confused now. We sort the columns here: https://github.com/GLIMS-RGI/rgitools/blob/c5d50429b06ac220d8e82a6a7c81613902bd82e5/rgitools/funcs.py#L487

Where do you think that this line should be?