|
From: Ethan A M. <sf...@us...> - 2017-02-01 21:37:33
|
On Wednesday, 01 February, 2017 14:04:18 Daniel J Sebald wrote: > Often when I am developing a set of plot commands I'll just toss in some > colors that are distinguishable, e.g., "red", "green". Something quick. > But those colors are often too bright or too monochrome to view > comfortably in a more "finished-product" plot such as a publication or > application. Why not use the default colors? Thay are specifically chosen to be distinguishable even if the viewer has color vision abnormalities or the publication process has changed the color space. If you like primary colors or extremes of hue, fine, but what matches your personal preference may be very far from what is suitable in publication or in a widely-used GUI. See for example Wong (2011) [Nature Methods 8:441], which was used as a guide for the default colors. Regardless of whether you love or hate the current default colors, the mechanism for replacing them with your own colors is pretty easy. Just add your preferred set of colors to the ~/gnuplot initialization file. Say you want colors that match the desktop theme Tango from a few years back: # # Medium saturation colors from the Tango theme (freedesktop.org) # set linetype 1 lc rgb "#75507b" lw 1 # Plum set linetype 2 lc rgb "#73d216" lw 1 # Chameleon set linetype 3 lc rgb "#cc0000" lw 1 # Scarlet Red set linetype 4 lc rgb "#edd400" lw 1 # Butter set linetype 5 lc rgb "#3465a4" lw 1 # Sky Blue set linetype 6 lc rgb "#c17d11" lw 1 # Chocolate set linetype 7 lc rgb "#555753" lw 1 # Aluminum 5 set linetype 8 lc rgb "#f57900" lw 1 # Orange Or suppose you are a fan of Matlab colors for the palette: # # Matlab "Jet" colormap # set pal defined (1 '#00008f', 8 '#0000ff', 24 '#00ffff', 40 '#ffff00', \ 56 '#ff0000', 64 '#800000') Gnuplot also knows at least some of the color names from the old X11 color set (rgb.txt). Try "show colornames". It might be worth extending or replacing this list to include the 140 color names in the current w3c HTML standard. Those, by the way, are available via a menu at http://www.w3schools.com/colors/colors_names.asp Ethan > To choose customized colors "#RRGGBB", I often go to some > color wheel (usually gimp) and pick the colors visually, for which the > color wheel presents the associated RGB values. > > The thought just came to mind, Why not add a color wheel to the Qt and > WXT terminals for the sake of convenience? That is, in the menu bar, > put a small "color-wheel" icon that will pop up the framework's > color-selector... the selector wouldn't control anything, but simply > help the user determine suitable RGB values. > > Does such a thing sound useful? > > Having said that, looking through the Qt terminal I see there is a > color-selector example already used for picking the background. So, > what I'm suggesting is already present. However, the color-selector > isn't obvious enough as a feature for convenience. > > BTW, the Qt background color selection has what I'd consider a bug. Do > some test plot: > > set term qt > plot x > > and then click on the wrench/settings icon. "Select background color" > has a white patch associated with it. Click on "Select background > color". Click "Cancel", and the QColorDialog closes but the associated > patch has turned black. I'd assume that "Cancel" should not change the > example patch. > > Dan > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |