brightwind-dev / brightwind

Python library containing wind analysis functions
MIT License
50 stars 18 forks source link

Rename colours to be more generic #118

Open stephenholleran opened 5 years ago

stephenholleran commented 5 years ago

Instead of 'green' use 'primary', 'asphalt' use 'secondary'. This makes it easier for users to assign their own colour scheme.

stephenholleran commented 5 years ago

for plot_12x24_contours()

cm = LinearSegmentedColormap.reversed(bw_colors('bw_col_map'))
x = ax.contourf(tab_12x24.columns, tab_12x24.index, tab_12x24.values, levels=levels,
        cmap=cm)
        # colors=['#e1f0c1', '#d6ebad', '#c2e184', '#aed75b', '#9acd32', '#8ab92d', '#7ba428', '#6b9023'])

The number of 'levels' can be increased now too if required.



inder-preet-kakkar commented 5 years ago

Previous 12x24 plot: image

New plot with bw_color_map: image

Levels are now automatically decided by matplotlib.

stephenholleran commented 5 years ago

:thumbsup:

inder-preet-kakkar commented 5 years ago

@stephenholleran Found a way to use bw_color_map in wind rose, and the results are below. Need to make a few housekeeping changes if you think we are good to go.

Previous wind rose: image

Wind rose with color map:

image

stephenholleran commented 5 years ago

@Inder95 we should definitely go with the new color map. It looks good, but both look good.

The legend colors don't match up with the plot. Are these the house keeping things you are talking about?

inder-preet-kakkar commented 5 years ago

@Inder95 we should definitely go with the new color map. It looks good, but both look good.

The legend colors don't match up with the plot. Are these the house keeping things you are talking about?

Yes these are the housekeeping issues. Will implement it.

inder-preet-kakkar commented 5 years ago

@stephenholleran Issue is fixed, feel free to merge the changes to master. image

stephenholleran commented 5 years ago