|
From: Daniel J S. <dan...@ie...> - 2017-02-01 20:40:49
|
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. 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 |
|
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 |
|
From: Daniel J S. <dan...@ie...> - 2017-02-01 22:09:56
|
On 02/01/2017 03:36 PM, Ethan A Merritt wrote:
> 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.
I personally don't like the extreme hue, but the point was the color
wheel is a convenient way of picking non-extreme colors.
Anyway, the colors listed in "test", i.e., 1, 2, 3, ... sort of works.
I've just tried that (7 looks to be a good medium hue red), but ran into
a little snag with the present code I have:
gnuplot> set object 1 rectangle from first 0,0 to first 2,2 fillcolor 7
fillstyle solid 1.0
^
colorspec option not recognized
Although "linecolor 7" appears to work for lines, fillcolor 7 doesn't
for polygons. Is that supposed to work? I need the color of a fill to
match the color of a line. Oh, wait, guess it does:
gnuplot> set object 1 rectangle from first 0,0 to first 2,2 fillcolor ls
7 fillstyle solid 1.0
> 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
Or an interpreter option "w3c", e.g.:
... linecolor w3c "PapayaWhip"
Interestingly, w3schools provides a color picker on its website:
http://www.w3schools.com/colors/colors_picker.asp
Dan
>
> 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
>
>
|
|
From: Daniel J S. <dan...@ie...> - 2017-02-01 22:35:35
|
On 02/01/2017 04:23 PM, Allin Cottrell wrote: > On Wed, 1 Feb 2017, 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. 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? [...] > > When I'm doing that sort of thing, my go-to is gcolor2 -- much lighter > than gimp -- http://gcolor2.sourceforge.net/ I like to have not only a > color wheel with a hex read-out but also an "eye-dropper" tool to grab a > nice color from somewhere on the desktop if required. gcolor2 has that > (as also gimp, of course). > > Whether this sort of tool is something that gnuplot should arrange to > provide, I don't know. I think it may fall under the "Swiss army knife" > (good software should not aim to be) objection. Yes, true. I was thinking that since these frameworks already have color-picker features, they are simply a matter of a few lines. I installed gcolor2 and this works nicely, thanks. In addition to the eye-dropper, it also goes one step more in convenience by combining the RGB into a ready-made triplet #rrggbb that can be easily selected, copied and pasted. Dan |
|
From: Daniel J S. <dan...@ie...> - 2017-02-01 22:41:58
|
On 02/01/2017 04:35 PM, Daniel J Sebald wrote: > On 02/01/2017 04:23 PM, Allin Cottrell wrote: [snip] >> When I'm doing that sort of thing, my go-to is gcolor2 -- much lighter >> than gimp -- http://gcolor2.sourceforge.net/ I like to have not only a >> color wheel with a hex read-out but also an "eye-dropper" tool to grab a >> nice color from somewhere on the desktop if required. gcolor2 has that >> (as also gimp, of course). >> >> Whether this sort of tool is something that gnuplot should arrange to >> provide, I don't know. I think it may fall under the "Swiss army knife" >> (good software should not aim to be) objection. > > Yes, true. I was thinking that since these frameworks already have > color-picker features, they are simply a matter of a few lines. > > I installed gcolor2 and this works nicely, thanks. In addition to the > eye-dropper, it also goes one step more in convenience by combining the > RGB into a ready-made triplet #rrggbb that can be easily selected, > copied and pasted. And there is a list of colors to choose from in gcolor2, including the "w3c" or "html" names that Ethan pointed out. Dan |
|
From: Allin C. <cot...@wf...> - 2017-02-01 22:53:27
|
On Wed, 1 Feb 2017, 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. 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? [...] When I'm doing that sort of thing, my go-to is gcolor2 -- much lighter than gimp -- http://gcolor2.sourceforge.net/ I like to have not only a color wheel with a hex read-out but also an "eye-dropper" tool to grab a nice color from somewhere on the desktop if required. gcolor2 has that (as also gimp, of course). Whether this sort of tool is something that gnuplot should arrange to provide, I don't know. I think it may fall under the "Swiss army knife" (good software should not aim to be) objection. Allin Cottrell |