Skip to content

[ENH] Scatter Plot Graph: legend opacity#2819

Merged
lanzagar merged 2 commits intobiolab:masterfrom
jerneju:spg-legend-opacity
Dec 11, 2017
Merged

[ENH] Scatter Plot Graph: legend opacity#2819
lanzagar merged 2 commits intobiolab:masterfrom
jerneju:spg-legend-opacity

Conversation

@jerneju
Copy link
Contributor

@jerneju jerneju commented Dec 6, 2017

Issue

See #2804 (review) fourth bullet.

Maybe for next PR : picture and legend should have the exact same colors/symbols

Description of changes

Take a look at Opacity Slider, Legend, and points!

screenshot_20171208_142924
screenshot_20171208_142932
screenshot_20171208_142937

Includes
  • Code changes
  • Tests
  • Documentation

@codecov-io
Copy link

codecov-io commented Dec 6, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@03ee289). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master    #2819   +/-   ##
=========================================
  Coverage          ?   80.77%           
=========================================
  Files             ?      324           
  Lines             ?    56221           
  Branches          ?        0           
=========================================
  Hits              ?    45413           
  Misses            ?    10808           
  Partials          ?        0

@jerneju jerneju assigned jerneju and lanzagar and unassigned jerneju Dec 7, 2017
@jerneju jerneju changed the title [WIP][ENH] Scatter Plot Graph: legend opacity [ENH] Scatter Plot Graph: legend opacity Dec 8, 2017
Copy link
Contributor

@janezd janezd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a bit of nitpicking. Otherwise OK.

for i, value in enumerate(self.attr_color.values):
color = QColor(*palette.getRGB(i))
brush = color.lighter(self.DarkerValue)
pen = make_pen(QColor(color).darker(self.DarkerValue), 1.5)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pen = make_pen(color.darker(self.DarkerValue), 1.5), without QColor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

_define_symbols()


def make_pen(color, width):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose we should better name it _make_pen, so we don't commit to keeping this function. Otherwise some add-on could rely on it.

@jerneju
Copy link
Contributor Author

jerneju commented Dec 11, 2017

@janezd : you can merge.

@lanzagar lanzagar merged commit e24c9dd into biolab:master Dec 11, 2017
@jerneju jerneju deleted the spg-legend-opacity branch December 11, 2017 10:34
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

Successfully merging this pull request may close these issues.

4 participants