modons / LMR

Source code for the Last Millennium Reanalysis (LMR) project
https://www.atmos.uw.edu/~hakim/LMR/
Other
29 stars 13 forks source link

Improving graphics in diagnostics plots #6

Open CommonClimate opened 7 years ago

CommonClimate commented 7 years ago
michaelerb commented 7 years ago

I'm almost done with the proxy-location-overlay function. Do you have the hex values for the colors of the proxy markers?

CommonClimate commented 7 years ago

I have the svg color names, which python understands. I'll send you the code snippet in a few. One improvement we could make is that some of my markers are not unique. I think matplotlib's vocabulary is a bit larger than Matlab's, so we can make them unique in python.

J

CommonClimate commented 7 years ago

Here it is:

https://github.com/CommonClimate/PAGES2k_phase2/blob/master/code_db/pages2k_db_synopsis.m

The colors are defined via the function rgb.m, which uses names compatible with Python’s mpl modules.

On May 17, 2017 at 11:56:59, Michael Erb (notifications@github.commailto:notifications@github.com) wrote:

I'm almost done with the proxy-location-overlay function. Do you have the hex values for the colors of the proxy markers?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_frodre_LMR_issues_6-23issuecomment-2D302195171&d=DwMCaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=sm7R-KWGS-qL7K-XLvSPqQ&m=vlroGP40F1sgyEc2FYzRug7_vx9eI1ZUKlBa5QreAqo&s=nPBvP_0yvPOFhLJMNIqjYVTe8J-Bo2lHgkRpEf3rP9Q&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ANH2339fTKeejL-2DBAuLqGHGvw3IOKch2ks5r60L1gaJpZM4NdM-5FW&d=DwMCaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=sm7R-KWGS-qL7K-XLvSPqQ&m=vlroGP40F1sgyEc2FYzRug7_vx9eI1ZUKlBa5QreAqo&s=vDuqILE-clACMNs5k80h-RrlhHxbhA5U4sUoH5LT46g&e=.

michaelerb commented 7 years ago

I've made a script which overlays proxy locations on top of a map, using Basemap. It plots only the proxies which were included in a given reanalysis. Here's the result:

temperature_map_lmr_all_1916_1995_hadcrut_krig_gaussianized_proxies_april2017

The script is flexible. The black border can be removed and markers can be resized or made transparent. All proxies can be plotted, or only proxies assimilated in a given year. Also, if a less noticeable overlay is desired, proxies can be plotted with a uniform marker (e.g. small dots of the same color). Corals and sclerosponges are grouped together in the LMR code, so they're grouped together here. I've also added an "other" category to make sure that no proxies slip through the cracks. Any suggestions? If not, I'll push this to github. If people are using something other than Basemap, a modified version will probably need to be created.

CommonClimate commented 7 years ago

Two thumbs up! Can you demonstrate the flexible features with a few more maps? They all seem very useful.

Small point: Is there any way to lighten up the legend? I never understood why MPL puts 3 symbols where one would suffice, but I don't know how easy that is to customize. If too much work, forget it.

Another useful graphical device is for the color of the proxy symbols to reflect how far back they reach (see attached figure from a pre-Ocean2k coral compilation I had made ages ago). In that case I suggest using the Magma or Plasma colormaps to display this continuum (warm colors = recent).

This will all be super useful in trying to understand our results.

[X]

Julien Emile-Geay - Associate Professor || University of Southern California Department of Earth Sciences & Center for Applied Mathematical Sciences 3651 Trousdale Parkway, ZHS 275. Los Angeles, CA 90089 - 0740 Tel: (213) 740 2945tel://(213)%20740%202945 | USChttp://climdyn.usc.edu/ | LinkedEarthhttps://urldefense.proofpoint.com/v2/url?u=http-3A__linked.earth&d=DgMFAg&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=sm7R-KWGS-qL7K-XLvSPqQ&m=OdmkXoaQMaVPmzAAdR2vjmSD8TxR1jRfosOKThmT5BI&s=DYialCdatO_E8LiPTdW3Nr-I68M_Xudoebt9mHN-tpw&e= | ORCIDhttps://urldefense.proofpoint.com/v2/url?u=http-3A__orcid.org_0000-2D0001-2D5920-2D4751&d=DgMFAg&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=sm7R-KWGS-qL7K-XLvSPqQ&m=OdmkXoaQMaVPmzAAdR2vjmSD8TxR1jRfosOKThmT5BI&s=n7sqHexywnF9scp3VA8wCApM11C6jCy7OEDyGMJ9V6k&e= | Twitterhttps://urldefense.proofpoint.com/v2/url?u=http-3A__twitter.com_el-5Fnino-5Fwaves&d=DgMFAg&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=sm7R-KWGS-qL7K-XLvSPqQ&m=OdmkXoaQMaVPmzAAdR2vjmSD8TxR1jRfosOKThmT5BI&s=HvF9H6dxxSzRgDMozbTJwARSHS1TA-_-rbEWWk5Gr0Y&e=

On May 17, 2017 at 14:05:58, Michael Erb (notifications@github.commailto:notifications@github.com) wrote:

I've made a script which overlays proxy locations on top of a map, using Basemap. It plots only the proxies which were included in a given reanalysis. Here's the result:

[temperature_map_lmr_all_1916_1995_hadcrut_krig_gaussianized_proxies_april2017]https://urldefense.proofpoint.com/v2/url?u=https-3A__cloud.githubusercontent.com_assets_15681231_26176024_8c7f45d6-2D3b09-2D11e7-2D86f5-2D47297b4a5fda.png&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=sm7R-KWGS-qL7K-XLvSPqQ&m=jqZDaJ3-UxhKqXIQdnc768Dn-B9Y_DIDiB3Jb5bURdk&s=508Li6Ivnom514JhvUSqutPHKfY-6WNq1RIzk5xQNMY&e=

The script is flexible. The black border can be removed and markers can be resized or made transparent. All proxies can be plotted, or only proxies assimilated in a given year. Also, if a less noticeable overlay is desired, proxies can be plotted with a uniform marker (e.g. small dots of the same color). Corals and sclerosponges are grouped together in the LMR code, so they're grouped together here. I've also added an "other" category to make sure that no proxies slip through the cracks. Any suggestions? If not, I'll push this to github. If people are using something other than Basemap, a modified version will probably need to be created.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_frodre_LMR_issues_6-23issuecomment-2D302231588&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=sm7R-KWGS-qL7K-XLvSPqQ&m=jqZDaJ3-UxhKqXIQdnc768Dn-B9Y_DIDiB3Jb5bURdk&s=Mykkft9qjpsrqCh2AU3jisJ8SnXe1t2HzPtMCNQe060&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ANH23-2DX2urCffSoNe6PD05kouoOO45-5Frks5r62EzgaJpZM4NdM-5FW&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=sm7R-KWGS-qL7K-XLvSPqQ&m=jqZDaJ3-UxhKqXIQdnc768Dn-B9Y_DIDiB3Jb5bURdk&s=detpD-hyeHYyc0VNpFDPVsnTRlWvKqbRxRrGq7i0IPg&e=.

michaelerb commented 7 years ago

I've changed the legend to have only one symbol. Symbols with colors indicating proxy length would be useful; I'll look into that another time. Here's two more examples. The first has tiny symbols. The second has small gray dots.

temperature_map_lmr_all_1916_1995_hadcrut_krig_gaussianized_proxies_april2017_2

temperature_map_lmr_all_1916_1995_hadcrut_krig_gaussianized_proxies_april2017_3

CommonClimate commented 7 years ago

Great, thank you for promptly sharing these plotting capabilities; that’s exactly the kind of thing workshop participants will want.

On May 17, 2017 at 17:11:05, Michael Erb (notifications@github.commailto:notifications@github.com) wrote:

I've changed the legend to have only one symbol. Symbols with colors indicating proxy length would be useful; I'll look into that another time. Here's two more examples. The first has tiny symbols. The second has small gray dots.

[temperature_map_lmr_all_1916_1995_hadcrut_krig_gaussianized_proxies_april2017_2]https://urldefense.proofpoint.com/v2/url?u=https-3A__cloud.githubusercontent.com_assets_15681231_26181245_8a3d2c60-2D3b23-2D11e7-2D8882-2Dd0968d390d17.png&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=sm7R-KWGS-qL7K-XLvSPqQ&m=-Ss9L5c7UxwnOOL-fJ5O2EBmgn11jwiGI5BjId3nDpw&s=f5dCRDVc-H7skS9wpGWwgeH3Dnq_ql6W9ewe2j_zSIs&e=

[temperature_map_lmr_all_1916_1995_hadcrut_krig_gaussianized_proxies_april2017_3]https://urldefense.proofpoint.com/v2/url?u=https-3A__cloud.githubusercontent.com_assets_15681231_26181246_8e634702-2D3b23-2D11e7-2D8866-2D59e3d1150ecd.png&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=sm7R-KWGS-qL7K-XLvSPqQ&m=-Ss9L5c7UxwnOOL-fJ5O2EBmgn11jwiGI5BjId3nDpw&s=oMgxdmF4_YGbN_EjbObuzES15kZSIWNQzve2yF5RkYU&e=

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_frodre_LMR_issues_6-23issuecomment-2D302264987&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=sm7R-KWGS-qL7K-XLvSPqQ&m=-Ss9L5c7UxwnOOL-fJ5O2EBmgn11jwiGI5BjId3nDpw&s=YLh_Qplse55x_6YNY0e332NaPqFT6T-78yGY25XZ0xU&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ANH236MbC3ZtoK3fa-2DjU4nYicJzA4gNkks5r64yOgaJpZM4NdM-5FW&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=sm7R-KWGS-qL7K-XLvSPqQ&m=-Ss9L5c7UxwnOOL-fJ5O2EBmgn11jwiGI5BjId3nDpw&s=10o_-kAHTsNpInJmwAL1i7bYhAfjPvse2gfa-U5OODA&e=.