|
From: Harald H. <h.h...@tu...> - 2005-01-10 19:03:51
|
Is there a way to fill the plot area with a background color?
What I mean is similar to this example:
set terminal postscript eps color rounded linewidth 2
set output 'asdf.eps'
set style line 1 lt 1 lw 4
set style line 9999 lt 6 lw 1
set style fill solid 1
plot 1 with filledcurves above y1=-1 ls 9999,\
sin(x) ls 1
Unfortunately, the tics are lost here. In my company, most plots are
filled by a yellow background (it does not matter if I like it). Now the
question is if I should programme a patch that provides something like
set backgroundcolor graph #rgb screen #rgb
or if there already is a possibility to reach that.
Greetings
Harald
--
Harald Harders
h.h...@tu...
http://www.harald-harders.de
|
|
From: Daniel J S. <dan...@ie...> - 2005-01-10 19:24:59
|
Harald Harders wrote: >Unfortunately, the tics are lost here. In my company, most plots are >filled by a yellow background (it does not matter if I like it). Now the >question is if I should programme a patch that provides something like > >set backgroundcolor graph #rgb screen #rgb > > On 11/28/04 thru 12/05/04 was a discussion about this. Petr proposed a similar, but slightly different syntax. Ethan had some comments prior to that about the functionality possibly already being present. Dan |
|
From: Ethan M. <merritt@u.washington.edu> - 2005-01-10 19:35:16
|
On Monday 10 January 2005 11:26 am, Daniel J Sebald wrote: > Harald Harders wrote: > > >Unfortunately, the tics are lost here. In my company, most plots are > >filled by a yellow background (it does not matter if I like it). Now the > >question is if I should programme a patch that provides something like > > > >set backgroundcolor graph #rgb screen #rgb > > > > On 11/28/04 thru 12/05/04 was a discussion about this. Petr proposed a > similar, but slightly different syntax. Ethan had some comments prior to > that about the functionality possibly already being present. It is already possible for many terminal types. Which ones are you interested in? -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |
|
From: Harald H. <h.h...@tu...> - 2005-01-10 19:43:40
|
On Mon, 10 Jan 2005, Ethan Merritt wrote: > On Monday 10 January 2005 11:26 am, Daniel J Sebald wrote: > > Harald Harders wrote: > > > > >Unfortunately, the tics are lost here. In my company, most plots are > > >filled by a yellow background (it does not matter if I like it). Now the > > >question is if I should programme a patch that provides something like > > > > > >set backgroundcolor graph #rgb screen #rgb > > > > > > > On 11/28/04 thru 12/05/04 was a discussion about this. Petr proposed a > > similar, but slightly different syntax. Ethan had some comments prior to > > that about the functionality possibly already being present. Strange that I do not remember. > It is already possible for many terminal types. > Which ones are you interested in? I am mainly using postscript. -- Harald Harders h.h...@tu... http://www.harald-harders.de |
|
From: Ethan M. <merritt@u.washington.edu> - 2005-01-10 20:25:58
|
On Monday 10 January 2005 11:45 am, Harald Harders wrote:
> > > Harald Harders wrote:
> > >
> > > >In my company, most plots are
> > > >filled by a yellow background
>
> > It is already possible for many terminal types.
> > Which ones are you interested in?
>
> I am mainly using postscript.
To recap my contribution to the previous discussion:
(1) Think of an eps file as having a transparent background.
gnuplot's PostScript output is agnostic with regard to
the background color. Put it on any background you like when
you import it into another document with specific layout or
style requirements.
(2) Adding a fully general capability is better than hacking
specific work-arounds into the driver code.
I have planned eventually to implement a new core command
set rectangle {n} <xlow>,<ylow>,<xhigh>,<yhigh>
{<fillstyle>} {front|back}
The boundaries would accept either graph or plot coords,
and you'd get the full range of fill-style colors, borders,
and other options.
I won't have time to work on this anytime soon, however,
so if you'd like to plunge in and contribute a patch
I'll help refine and polish it when I emerge from the end
of my current press of deadlines.
--
Ethan A Merritt merritt@u.washington.edu
Biomolecular Structure Center
Mailstop 357742
University of Washington, Seattle, WA 98195
|
|
From: Harald H. <h.h...@tu...> - 2005-01-10 22:56:25
|
On Mon, 10 Jan 2005, Ethan Merritt wrote:
> > > > >In my company, most plots are
> > > > >filled by a yellow background
> >
> > > It is already possible for many terminal types.
> > > Which ones are you interested in?
> >
> > I am mainly using postscript.
>
> To recap my contribution to the previous discussion:
>
> (1) Think of an eps file as having a transparent background.
> gnuplot's PostScript output is agnostic with regard to
> the background color. Put it on any background you like when
> you import it into another document with specific layout or
> style requirements.
Yes, I know that possibility. But it is trial and error to get the right
position of the colored rectangle.
> (2) Adding a fully general capability is better than hacking
> specific work-arounds into the driver code.
> I have planned eventually to implement a new core command
>
> set rectangle {n} <xlow>,<ylow>,<xhigh>,<yhigh>
> {<fillstyle>} {front|back}
>
> The boundaries would accept either graph or plot coords,
> and you'd get the full range of fill-style colors, borders,
> and other options.
That idea is better then mine. I will see if I can find the time to
programme it. Should not be too complicated.
Harald
--
Harald Harders
h.h...@tu...
http://www.harald-harders.de
|
|
From: Ethan M. <merritt@u.washington.edu> - 2005-01-10 20:30:50
|
On Monday 10 January 2005 11:05 am, Harald Harders wrote: > Is there a way to fill the plot area with a background color? > What I mean is similar to this example: > > set terminal postscript eps color rounded linewidth 2 > set output 'asdf.eps' > set style line 1 lt 1 lw 4 > set style line 9999 lt 6 lw 1 > set style fill solid 1 > plot 1 with filledcurves above y1=-1 ls 9999,\ > sin(x) ls 1 > > Unfortunately, the tics are lost here. To get your tics back, add the command set grid front nox noy noz -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |
|
From: Daniel J S. <dan...@ie...> - 2005-01-10 23:41:12
|
Ethan Merritt wrote: >On Monday 10 January 2005 11:05 am, Harald Harders wrote: > > >>Is there a way to fill the plot area with a background color? >>What I mean is similar to this example: >> >>set terminal postscript eps color rounded linewidth 2 >>set output 'asdf.eps' >>set style line 1 lt 1 lw 4 >>set style line 9999 lt 6 lw 1 >>set style fill solid 1 >>plot 1 with filledcurves above y1=-1 ls 9999,\ >> sin(x) ls 1 >> >>Unfortunately, the tics are lost here. >> >> > >To get your tics back, add the command > set grid front nox noy noz > > If the density of the fill is set to 0.3 or so, this turns out really nice. Sort of what I had in mind a few months back... Well, it looks good in PostScript that is, because the background is pastel yellow... which probably is almost always going to be the preferred color for such things. In x11, the color is brown, which you can guess what that looks like. In any case, this begs the question, why isn't there a demo for this sort of thing? Dan |
|
From: Daniel J S. <dan...@ie...> - 2005-01-11 01:07:56
|
Daniel J Sebald wrote:
> Ethan Merritt wrote:
>
>> On Monday 10 January 2005 11:05 am, Harald Harders wrote:
>>
>>
>>>
>>> plot 1 with filledcurves above y1=-1 ls 9999,\
>>> sin(x) ls 1
>>>
> In any case, this begs the question, why isn't there a demo for this
> sort of thing?
Oh, now I see. This is a bit kudgy, with the filledcurves to fill the
whole backdrop. But it is the right idea. So, a better syntax and then
a demo would be nice. Below is Petr's ideas for a syntax, pretty much
the same as putting rectangles behind the various elements. (The
problem with the "rectangle <location>" is that the user will not know
exactly where the key will land.
Color control beyond the basic 1,2,...,8 colors would be nice. I think
Petr and Ethan discussed a more advanced color syntax, if I'm not mistaken.
Dan
==========
Yet another background is that of the graph (easy for 2D and 'view map',
more intriguing for 3D), and for the key.
What about some new syntax for that?
set key ... background rgb "gray10"
set border ... background rgb "gray10"
set size ... background rgb "cyan"
or
set style background {key | border | graph | paper} .... ?
|