PiRSquared17 / cing

Automatically exported from code.google.com/p/cing
0 stars 0 forks source link

dihedralComboPlot had grey background whereas it should be white. #214

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run with matplotlib version 
__version__  = '0.99.1.1'
__revision__ = '$Revision: 7813 $'
__date__     = '$Date: 2009-09-21 12:12:47 -0500 (Mon, 21 Sep 2009) $'

The diff is in the attached test file as the grey background.

Original issue reported on code.google.com by jurge...@gmail.com on 3 Nov 2009 at 3:17

Attachments:

GoogleCodeExporter commented 9 years ago
The way it should look is attached from 1brv.
http://nmr.cmbi.ru.nl/NRG-CING//data/br/1brv/1brv.cing/1brv/HTML/Molecule/A/ALA1
81/Ramachandran.png

Original comment by jurge...@gmail.com on 4 Nov 2009 at 1:41

Attachments:

GoogleCodeExporter commented 9 years ago
Filed a bug report at:
http://sourceforge.net/tracker/?func=detail&aid=2891982&group_id=80706&atid=5607
20

Patched code so it doesn't look too bad. Keeping bug open for it does need to 
be improved.

Original comment by jurge...@gmail.com on 4 Nov 2009 at 4:05

GoogleCodeExporter commented 9 years ago
Committed patch in r661

Original comment by jurge...@gmail.com on 5 Nov 2009 at 10:53

GoogleCodeExporter commented 9 years ago
Still no feedback on the bug report. Since it's an internal matplotlib bug it's 
hard to program around it.

Original comment by jurge...@gmail.com on 27 Nov 2009 at 1:32

GoogleCodeExporter commented 9 years ago
Looks like the matplotlib bug won't get fixed from the sf tracker.

Original comment by jurge...@gmail.com on 14 Dec 2009 at 2:41

GoogleCodeExporter commented 9 years ago
Apparently fixed:

Date: 2010-06-01 01:03:51 UTC
Sender: efiring

Fixed in svn 8355 and 8356.

Original comment by jurge...@gmail.com on 11 Jun 2010 at 9:09

GoogleCodeExporter commented 9 years ago
Details are at:
http://matplotlib.svn.sourceforge.net/viewvc/matplotlib?view=rev&revision=8356

Looks like I'm on 7813.

jd:stella/~/ grep revision 
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-p
ackages/matplotlib/*.py
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-p
ackages/matplotlib/__init__.py:__revision__ = '$Revision: 7813 $'

It looks like this is not trivial to include in macports environment. Let's 
keep this bug open until solution has been verified.

Original comment by jurge...@gmail.com on 11 Jun 2010 at 9:36

GoogleCodeExporter commented 9 years ago
When I updated to 8356 the bug was gone.
It however didn't bring out the bright colors I had before.

Keeping this issue open until update can be assumed. When so, the CING code 
needs to be updated here:

            if True: # Set to False when matplotlib can be upgrade to at least revision 8356
                # See: http://matplotlib.svn.sourceforge.net/viewvc/matplotlib?view=rev&revision=8356
                palette = cmapList[i]
                palette.set_under(color = 'w', alpha = 0.0 ) # alpha is 0.0
                palette.set_over( color = colorList[i], alpha = 1.0) # alpha is 1.0 Important to make it a hard alpha; last plotted will rule.
                palette.set_bad(color = 'w', alpha = 0.0 )
            else:
                palette = cmapList[i]
                palette.set_under(color = 'w', alpha = 0.0 ) # alpha is 0.0
                palette.set_over( color = colorList[i], alpha = 1.0) # alpha is 1.0 Important to make it a hard alpha; last plotted will rule.

Original comment by jurge...@gmail.com on 11 Jun 2010 at 11:46

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The attached shows quite a difference with the desired effect as shown in an 
old image at comment 1.

Original comment by jurge...@gmail.com on 11 Jun 2010 at 11:54

Attachments:

GoogleCodeExporter commented 9 years ago
This is the solution:

blue_inv.set_under(color='w',alpha=0.0)
myHistScaledAndMaskedandAlphaed = blue_inv(myHistScaledAndMasked)

imshow( myHistScaledAndMaskedandAlphaed,
        interpolation='bicubic',
        origin='lower',
        extent=extent
         )

No time to commit now.

Original comment by jurge...@gmail.com on 11 Jun 2010 at 2:54

GoogleCodeExporter commented 9 years ago
Did take some more effort. Apparently the alpha settings from imshow aren't up 
to snuf.
Fixed in r797 thanks to tip at:
http://stackoverflow.com/questions/2495656/variable-alpha-blending-in-pylab

Original comment by jurge...@gmail.com on 11 Jun 2010 at 9:24