Grid and fill color with background

Found a bug? Tell us about it here

Moderator: DPlotAdmin

Post Reply
User avatar
Roberto
Posts: 102
Joined: Sun Mar 16, 2008 6:11 am
Location: Netherlands Beek en Donk

Grid and fill color with background

Post by Roberto »

Hi,

I ran into two unsuspected behaviors when having a background image in the plot:

1) When setting grid color to fully (! rgb 255-255-255) white then the grid becomes black instead of white (also without background image).

2a) Fill between curves: when choosing User Defined then the selected pattern color is not 100% saturated but blended with the background image and grid. It looks like it's a "Multiply" blending type.
I used a "dot" or rather "filled circle" pattern when I found this behavior.

2b) See 2a; when color "white" is selected then the pattern gets invisible instead of "white". Strangely this is not the case with the non-User Defined patterns.

I suppose the white issue in 2 is just a workaround to avoid the no-color blocks (white) in the pattern designer to be visible. Image editors deal with that by using a fourth "alpha" (transparency) channel (next to the three R, G and B channels).
However, with avoiding the use of alpha channels I suppose it's better to choose an uncomon color for the "no color blocks" (e.g. 255,255,254) instead of white so a pure white-colored pattern can be drawn.

Roberto
Roberto
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Thanks for your feedback.

#1 isn't so much a bug as a failure to take backgrounds into account. That "feature" is by design - if the plot background color is white and the grid color is white, the grid is drawn black. Off the top of my head I think this is the only combination for which that switch is made. If this bothers you then you can get around it by using r,g,b=254,254,254 for the grid (or the plot).

#2 is by design. Next time you use "Fill Between Curves" click the Help button and scroll to "Note on Color". I should probably make this some sort of option.
Visualize Your Data
support@dplot.com
User avatar
Roberto
Posts: 102
Joined: Sun Mar 16, 2008 6:11 am
Location: Netherlands Beek en Donk

Post by Roberto »

Hi,

#1 Grid also gets black while selected white if the plot background color is not white. So it is not background image dependent only.
If ít was up to me I would keep things simple and intuitive: set white = grid white.

#2 Yep, it's described there indeed. But why the heck would just and only User Defined behave differently from any of the other 7 options?
Or what about leaving that to the user by adding a "blend color" checkbox?
Once again, if it was up to me I would keep things as consequent (thus intuitive) as possible. Just for the sake of avoiding confusion or people sending in false bug reports :-P.

Oh well, guess there are reasons for the current behavior.

Cheers,
Roberto[/quote]
Roberto
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

#1. Whoops, you're right. And the switch makes even less sense now then it used to. If the Windows window color setting is the same as the grid line color, grid lines are forced to black. Older versions of DPlot didn't allow you to set background colors for the document or the plot (they always used the window color setting), so this made sense then if you tilted your head just right. Not any more.

#2. I'm pretty sure this decision was based on a Windows 3.1 limitation with fill patterns, and I wanted to be consistent. But I'm also pretty sure most users don't remember Windows 3.1 :-). I still can't arbitrarily change it, though, as there may be plots out there that depend on this behavior. So I'll add a setting to either paint the pattern as is, or combine it with the background using some other paint option.
Visualize Your Data
support@dplot.com
Post Reply