Skip to content

Solarize_Light2 #3851

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

Closed
wants to merge 13 commits into from
Closed

Solarize_Light2 #3851

wants to merge 13 commits into from

Conversation

ilivni
Copy link
Contributor

@ilivni ilivni commented Nov 26, 2014

Adapted from ggplot2

Title padding
Title color
Minor grid width
Alpha for graphs with a "fill"

Adapted from ggplot2

Title padding
Title color
Minor grid width
Alpha for graphs with a "fill"
@ilivni
Copy link
Contributor Author

ilivni commented Nov 26, 2014

Hi - I would like to resolve the todo list after you check the style sheet. This way I can port over the other styles and schemes...

@tacaswell
Copy link
Member

I don't really understand what you mean.

If you are copying color maps/styles from other sources can you also do the leg work to make sure we have license to include them?

@tacaswell tacaswell added this to the v1.5.x milestone Nov 26, 2014
@ilivni
Copy link
Contributor Author

ilivni commented Nov 26, 2014

I did - before submitting. Let me know if there is more to this.

ggplot2 is gnu2

Solarized
Copyright (c) 2011 Ethan Schoonover

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

@tacaswell
Copy link
Member

mpl uses a bsd-derived license which means we can not include gpl licensed code.

@ilivni
Copy link
Contributor Author

ilivni commented Nov 26, 2014

Ok. I will look into that.
Hmm so even when 2 open source projects are on github under different "derived licenses" they cannot be used? Your guidance will save some time :)

Also the solarized palette is just everywhere as you probably know.

Thanks

@tacaswell
Copy link
Member

To be clear, I am not a lawyer. You should spend some time understanding the difference between GPL and BSD/MIT/apache. The crux of the differences is the conditions on the licensing of derived works. You can use mixed license stacks, but we can not integrate GPL code into our code base (but a GPL project could integrate our code into their code base).

I am hesitant to go into too much depth, but unless you get permission from the ggplot copyright holders, we can not use their colors.

See the discussion in #3700, we are taking a very conservative approach to integrating IP from other sources.

We can use the solarize colors, but the license file needs to go into the LICENSES folder.

@ilivni
Copy link
Contributor Author

ilivni commented Nov 26, 2014

I am not a lawyer

Yes :). I also read discussion #3700.

Just to be clear

I am hesitant to go into too much depth, but unless you get permission from the ggplot copyright holders, we can not use their colors.

These are not their colors... I just looked at jrnold (github) while looking for a matplotlib version of the theme.

Let me know if this clears anything up..

Taken from the Solarized Github page:
https://github.com/altercation/solarized
@tacaswell
Copy link
Member

Can you also add an example? Someplace in the examples directory there is the start of a style gallery.

@ilivni
Copy link
Contributor Author

ilivni commented Nov 26, 2014

Yes. When is the next release date? It will be my first ... so it will be slow going.

I suppose I need to use some standard data set available in pandas?

Cool. This is fun...

@tacaswell
Copy link
Member

Please no pandas dependency, see the examples here: https://github.com/matplotlib/matplotlib/tree/master/examples/style_sheets

No changes to the mplstyle.
@ilivni
Copy link
Contributor Author

ilivni commented Nov 26, 2014

Ok let me know what else is missing or needs to be conformed to standards.

@@ -0,0 +1,42 @@
"""
Copy link
Member

Choose a reason for hiding this comment

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

This should have a file extension.

Conforming to matplolib conventions
@ilivni
Copy link
Contributor Author

ilivni commented Nov 27, 2014

Which file? Failed where?

@tacaswell
Copy link
Member

https://travis-ci.org/matplotlib/matplotlib/jobs/42256473


======================================================================
FAIL: matplotlib.tests.test_coding_standards.test_pep8_conformance_examples
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/matplotlib-1.5.x-py2.7-linux-x86_64.egg/matplotlib/tests/test_coding_standards.py", line 285, in test_pep8_conformance_examples
    expected_bad_files=expected_bad_files)
  File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/matplotlib-1.5.x-py2.7-linux-x86_64.egg/matplotlib/tests/test_coding_standards.py", line 140, in assert_pep8_conformance
    assert_equal(result.total_errors, 0, msg)
AssertionError: Found code syntax errors (and warnings):
/home/travis/build/matplotlib/matplotlib/examples/style_sheets/plot_solarizedlight2.py:8:1: W293 blank line contains whitespace
/home/travis/build/matplotlib/matplotlib/examples/style_sheets/plot_solarizedlight2.py:11:1: W293 blank line contains whitespace
/home/travis/build/matplotlib/matplotlib/examples/style_sheets/plot_solarizedlight2.py:26:1: W293 blank line contains whitespace
/home/travis/build/matplotlib/matplotlib/examples/style_sheets/plot_solarizedlight2.py:34:57: W291 trailing whitespace
/home/travis/build/matplotlib/matplotlib/examples/style_sheets/plot_solarizedlight2.py:38:1: W293 blank line contains whitespace
/home/travis/build/matplotlib/matplotlib/examples/style_sheets/plot_solarizedlight2.py:42:10: E201 whitespace after '('
/home/travis/build/matplotlib/matplotlib/examples/style_sheets/plot_solarizedlight2.py:42:12: W292 no newline at end of file

----------------------------------------------------------------------

@ilivni
Copy link
Contributor Author

ilivni commented Nov 27, 2014

It is complaining about white spaces between commented lines. Is that a no? Trying again... made some changes I hope will make it work.

Failed last  Travis regression
@tacaswell
Copy link
Member

The automated pep8 tests are a bit contentious, but overall are useful. We ignore most of the more obnoxious tests, but the trailing whitespace is one of the more important ones we do follow. It really helps to cut down on excessive white-space related conflicts if it just never makes onto the master branch.

@ilivni
Copy link
Contributor Author

ilivni commented Nov 29, 2014

I am a bit of a loss on where and how to get rid of the white spaces. Any links or suggestions appreciated.

Thanks

@WeatherGod
Copy link
Member

Most modern text editors have some sort of way to zap trailing whitespaces,
or at least flag them obnoxiously. Which editor are you using?

On Sat, Nov 29, 2014 at 3:04 PM, Itay Livni notifications@github.com
wrote:

I am a bit of a loss on where and how to get rid of the white spaces. Any
links or suggestions appreciated.

Thanks


Reply to this email directly or view it on GitHub
#3851 (comment)
.

@ilivni
Copy link
Contributor Author

ilivni commented Nov 29, 2014

Sublime. But I am quite new.

Let me see if this file passes

Tried setting the user save preference
"trim_trailing_white_space_on_save": true
@WeatherGod
Copy link
Member

And, since you are new, I would suggest looking into tab settings: https://www.sublimetext.com/docs/2/indentation.html
Tabs should (almost) always be replaced with spaces. The only exception I can think of are Makefiles. I have my vim settings to always do what are called "soft tabs" except for Makefiles.

@ilivni
Copy link
Contributor Author

ilivni commented Nov 29, 2014

lol... I thought the opposite. Thanks.

What is annoying is that I don't see the bad formatting in the file.

On Sat, Nov 29, 2014 at 2:53 PM, Benjamin Root notifications@github.com
wrote:

And, since you are new, I would suggest looking into tab settings:
https://www.sublimetext.com/docs/2/indentation.html
Tabs should (almost) always be replaced with spaces. The only exception I
can think of are Makefiles. I have my vim settings to always do what are
called "soft tabs" except for Makefiles.


Reply to this email directly or view it on GitHub
#3851 (comment)
.

Itay Livni

theGraybox http://www.thegrbox.com/#about

@WeatherGod
Copy link
Member

That's the problem with tabs. It may look good to you, but for others with
different tab sizes, it may look wrong. Furthermore, given Python's
sensitivity to whitespace alignment, you really should avoid tabs. I would
suggest taking a look at the diff on github and you will see what I mean.

A useful utility in linux is "expand" which will replace all tabs with
spaces. I suggest 4 spaces to a tab.

On Sat, Nov 29, 2014 at 4:03 PM, Itay Livni notifications@github.com
wrote:

lol... I thought the opposite. Thanks.

What is annoying is that I don't see the bad formatting in the file.

On Sat, Nov 29, 2014 at 2:53 PM, Benjamin Root notifications@github.com
wrote:

And, since you are new, I would suggest looking into tab settings:
https://www.sublimetext.com/docs/2/indentation.html
Tabs should (almost) always be replaced with spaces. The only exception
I
can think of are Makefiles. I have my vim settings to always do what are
called "soft tabs" except for Makefiles.


Reply to this email directly or view it on GitHub
<
https://github.com/matplotlib/matplotlib/pull/3851#issuecomment-64964877>
.

Itay Livni

theGraybox http://www.thegrbox.com/#about


Reply to this email directly or view it on GitHub
#3851 (comment)
.

@ilivni
Copy link
Contributor Author

ilivni commented Nov 30, 2014

Maybe it is because I am using Windows 7. Does the file encoding have anything to do with it?

@tacaswell
Copy link
Member

All files should have unix-style line endings.

@tacaswell tacaswell modified the milestones: proposed next point release, next point release Feb 19, 2015
@tacaswell tacaswell modified the milestones: proposed next point release, next point release Jun 17, 2015
@tacaswell tacaswell closed this Mar 22, 2016
@tacaswell tacaswell reopened this Mar 22, 2016
@tacaswell
Copy link
Member

@ilivni Any interest in picking this up again? I think that this looks OK to merge (modulo moving the example to the examples folder).

@QuLogic
Copy link
Member

QuLogic commented Mar 22, 2016

The style is named Solarize_Light2 but not Solarized. Also, why the 2?

There are some TODOs left in the comments.

@andreas-h
Copy link
Contributor

I'd love to see this in mpl, I love the solarized colors!

But shouldn't the style be called solarized_light2 instead of solarize_light2?

@tacaswell tacaswell mentioned this pull request Aug 13, 2017
2 tasks
@tacaswell
Copy link
Member

Closing in favor of #9026 which is a rebase-and-squash of the commits here

@ilivni Thank you for your work and sorry it sat so long!

@tacaswell tacaswell closed this Aug 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants