Re: Trying to get boxes to have different colors for border and interior
hchiPer <[email protected]> Tue, 21 Feb 2023 10:47:12 +0100
| Newsgroups | gmane.comp.graphics.gnuplot.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, The border properties can be set via the 'set fill style' command, where a linetype can be specified, so you have either to use the linetype which has the desired color as a default, or to redefine a particular linetype with the parameters you need. I managed to get the expected result this way (I'm using gnuplot 5.4.4): 1) redefine one of the default linetypes with the desired parameters (line color, line width and even dash type) set linetype 1 lc 'blue' lw 3 # dt 2 2) redefine the fill style in order that it uses the desired linetype (fillcolor can't be defined here) set style fill border lt 1 # or 'noborder' for a box without border 3) plot your data by specifying the fill color only (the border presence and properties depending of the parameters of the previous 'set style fill' command: plot '-' w boxes fs solid 0.1 fc 'red' 0.2 0.3 0.1 0.4 0.8 0.1 0.6 0.4 0.1 e Laurent Le 19/02/23 à 02:46, Robert Dodier a écrit : > Hi, I'm working with boxes and I'd like to see if I can arrange for > the line around the border of the box to be a different color than the > interior of the box. > > I tried the following and I expected it to draw boxes which have a red > interior and blue border: > > plot '-' with boxes fillstyle solid 0.1 linewidth 3 linecolor 'blue' > fillcolor 'red' > 0.2 0.3 0.1 > 0.4 0.8 0.1 > 0.6 0.4 0.1 > e > > but what I see is that the border is red as well as the interior. > > When I try it without fillcolor, > > plot '-' with boxes fillstyle solid 0.1 linewidth 3 linecolor 'blue' > 0.2 0.3 0.1 > 0.4 0.8 0.1 > 0.6 0.4 0.1 > e > > the border is blue, as expected (and the interior is also blue, as > expected, since the documentation for boxes says that the fillcolor > defaults to the linecolor if not otherwise specified). > > Looking at the documentation for boxes, it doesn't seem to say > anything about how the border color is determined, and also doesn't > seem to say anything about the linecolor parameter, except to say > fillcolor defaults to linecolor. > > Is the observed behavior for the first example to be expected, or is > it a bug? Is there a way to get the border and the interior to be > different colors? > > Thanks for any light you can shed on this, I appreciate your help. > > Robert Dodier > > > _______________________________________________ > gnuplot-info mailing list > [email protected] > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info _______________________________________________ gnuplot-info mailing list [email protected] Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info