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

[Iss310] different colours plot scatter #374

Merged
merged 6 commits into from
Feb 14, 2023

Conversation

BiancaMorandi
Copy link
Contributor

  1. updated the plot_scatter , plot_scatter_by_sector to give as input to _scatter_subplot the scatter and trendline colors
  2. updated plot_timeseries default line_colors input option

@BiancaMorandi BiancaMorandi added the bug Something isn't working label Feb 7, 2023
@BiancaMorandi BiancaMorandi self-assigned this Feb 7, 2023
@BiancaMorandi BiancaMorandi added this to Awaiting Approval in brightwind kanban Feb 7, 2023
@BiancaMorandi BiancaMorandi moved this from Awaiting Approval to In progress in brightwind kanban Feb 7, 2023
@BiancaMorandi BiancaMorandi moved this from In progress to Awaiting Approval in brightwind kanban Feb 7, 2023
@stephenholleran
Copy link
Collaborator

Hi @BiancaMorandi ,

The below code should set the trendline to yellow. But it doesn't?

bw.analyse.plot.COLOR_PALETTE.primary = '#FF0000' # Red
bw.analyse.plot.COLOR_PALETTE.secondary = '#FFFF00' # Yellow
data = bw.load_csv(bw.demo_datasets.demo_data)
WSPD_COLS = ['Spd80mN', 'Spd80mS', 'Spd60mN', 'Spd60mS', 'Spd40mN', 'Spd40mS']
display(bw.plot_scatter_wspd(data[WSPD_COLS[0]],data[WSPD_COLS[1]]))

@BiancaMorandi
Copy link
Contributor Author

BiancaMorandi commented Feb 14, 2023

bw.analyse.plot.COLOR_PALETTE.primary = '#FF0000' # Red
bw.analyse.plot.COLOR_PALETTE.secondary = '#FFFF00' # Yellow
data = bw.load_csv(bw.demo_datasets.demo_data)
WSPD_COLS = ['Spd80mN', 'Spd80mS', 'Spd60mN', 'Spd60mS', 'Spd40mN', 'Spd40mS']
display(bw.plot_scatter_wspd(data[WSPD_COLS[0]],data[WSPD_COLS[1]]))

@stephenholleran color you have changed is for the trendline and what you are looking at is the 1:1 line for which color is defined at the moment as bw.analyse.plot.COLOR_PALETTE.secondary_70. if you run code below you will get what you expect. I think that we should replace any variable defining the shade of a color with a function calculating this based on the update of the main color.

bw.analyse.plot.COLOR_PALETTE.primary = '#FF0000' # Red
bw.analyse.plot.COLOR_PALETTE.secondary_70 = '#FFFF00' # Yellow
data = bw.load_csv(bw.demo_datasets.demo_data)
WSPD_COLS = ['Spd80mN', 'Spd80mS', 'Spd60mN', 'Spd60mS', 'Spd40mN', 'Spd40mS']
display(bw.plot_scatter_wspd(data[WSPD_COLS[0]],data[WSPD_COLS[1]]))```

@stephenholleran
Copy link
Collaborator

Ah, I should be running this:
image


I think that we should replace any variable defining the shade of a color with a function calculating this based on the update of the main color.

Good idea. Could you create a card to capture this. We probably need to restructure the whole _ColorPalette class so this can be part of it.

@stephenholleran stephenholleran merged commit 0dc0534 into dev Feb 14, 2023
@stephenholleran stephenholleran deleted the iss310_different_colours_plot_scatter branch February 14, 2023 12:18
@stephenholleran stephenholleran moved this from Awaiting Approval to Done in brightwind kanban Feb 14, 2023
@BiancaMorandi
Copy link
Contributor Author

Good idea. Could you create a card to capture this. We probably need to restructure the whole _ColorPalette class so this can be part of it.

Opened issue #381

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants