{"action":"created","issue":{"url":"https://api.github.com/repos/dankelley/oce/issues/753","labels_url":"https://api.github.com/repos/dankelley/oce/issues/753/labels{/name}","comments_url":"https://api.github.com/repos/dankelley/oce/issues/753/comments","events_url":"https://api.github.com/repos/dankelley/oce/issues/753/events","html_url":"https://github.com/dankelley/oce/issues/753","id":107321164,"number":753,"title":"plot.section (zcol=?)","user":{"login":"atcogswell","id":13316225,"avatar_url":"https://avatars.githubusercontent.com/u/13316225?v=3","gravatar_id":"","url":"https://api.github.com/users/atcogswell","html_url":"https://github.com/atcogswell","followers_url":"https://api.github.com/users/atcogswell/followers","following_url":"https://api.github.com/users/atcogswell/following{/other_user}","gists_url":"https://api.github.com/users/atcogswell/gists{/gist_id}","starred_url":"https://api.github.com/users/atcogswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atcogswell/subscriptions","organizations_url":"https://api.github.com/users/atcogswell/orgs","repos_url":"https://api.github.com/users/atcogswell/repos","events_url":"https://api.github.com/users/atcogswell/events{/privacy}","received_events_url":"https://api.github.com/users/atcogswell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-19T09:14:18Z","updated_at":"2015-09-19T10:38:36Z","closed_at":null,"body":"Dan (or others),\r\n\r\nI'd like to pick your brain about adjusting the color ramp for the plot.section function.  I can adjust the \"zbreaks\" in the plot.section function to make the area of interest in the salinity section \"light up\" but I'd like to change the ramp from the default blue to red, to something more complex using purples, pinks, etc...  I've tried added a list of individual colors to the zcol option, but it just does not give the same look as a colour ramp.  I'm at sea right now, so it is unlikely that the image I placed in here will upload:\r\n\r\n#Salinity Section Plot\r\njpeg(paste('NL_section_image_salinity',date,'.jpg',sep=\"\"), width=1600,height=800)\r\npar(cex.axis=1.2,cex.lab=1.2)\r\nbr=c(28,29,30,31,32,33,34,34.05,34.1,34.11,34.12,34.13,34.14,34.15,34.16,34.17,34.18,34.19,34.2,34.21,34.22,34.23,34.24,34.25,34.26,34.27,34.28,34.29,34.3,34.31,34.32,34.33,34.34,34.35,34.36,34.37,34.38,34.39,34.4,34.41,34.415,34.42,34.425,34.43,34.435,34.44,34.445,34.45,34.455,34.46,34.465,34.47,34.475,34.48,34.485,34.49,34.495,34.5,34.51,34.52,34.53,34.54,34.55,34.56,34.57,34.58,34.59)\r\nplot(NLsec, which=2, ztype=\"image\",zbreaks=br)\r\n#Again, I've tried modifying the zcol option.\r\ndev.off()\r\n\r\n![image](https://cloud.githubusercontent.com/assets/13316225/9975516/21fd795a-5eae-11e5-8def-7747e3de99c1.png)"},"comment":{"url":"https://api.github.com/repos/dankelley/oce/issues/comments/141643832","html_url":"https://github.com/dankelley/oce/issues/753#issuecomment-141643832","issue_url":"https://api.github.com/repos/dankelley/oce/issues/753","id":141643832,"user":{"login":"dankelley","id":99469,"avatar_url":"https://avatars.githubusercontent.com/u/99469?v=3","gravatar_id":"","url":"https://api.github.com/users/dankelley","html_url":"https://github.com/dankelley","followers_url":"https://api.github.com/users/dankelley/followers","following_url":"https://api.github.com/users/dankelley/following{/other_user}","gists_url":"https://api.github.com/users/dankelley/gists{/gist_id}","starred_url":"https://api.github.com/users/dankelley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dankelley/subscriptions","organizations_url":"https://api.github.com/users/dankelley/orgs","repos_url":"https://api.github.com/users/dankelley/repos","events_url":"https://api.github.com/users/dankelley/events{/privacy}","received_events_url":"https://api.github.com/users/dankelley/received_events","type":"User","site_admin":false},"created_at":"2015-09-19T10:38:36Z","updated_at":"2015-09-19T10:38:36Z","body":"Gosh, I was thinking what to write and Clark comes in and writes my very ideas, but much improved and clarified.  (Plus ca change.) Another thing I'd add is that oce should really have this nice new matlab scheme called parula [http://blogs.mathworks.com/steve/2014/10/20/a-new-colormap-for-matlab-part-2-troubles-with-rainbows/](http://blogs.mathworks.com/steve/2014/10/20/a-new-colormap-for-matlab-part-2-troubles-with-rainbows/) and that might help you a bit.  I'm not sure what kind of bandwidth you have at sea, but it would be easy for us to add parula to the ``development`` branch, if you'd like to upload and build it.\r\n\r\nPS. I have never been any good at picking colours. Clark's idea about using ramped palettes is a good one. Bear in mind that you can string together a lot of ramped palettes, so you can design one to go from yellow through orange to red, then another for another \"band\" etc. But designing your own colours can take forever (there will *always* be some colour that bothers you, standing out like a sore thumb) and then there are the problems with colour-altered people, and with black/white printing ... I think parula might be worth a shot.\r\n\r\nPPS. check out the \"colorbrewer\" site [http://colorbrewer2.org](http://colorbrewer2.org)"}}