[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rectangular zones in graphs
From: |
Martin Michel |
Subject: |
Re: Rectangular zones in graphs |
Date: |
Thu, 28 May 2020 21:54:03 +0200 |
User-agent: |
NeoMutt/20180716 |
William,
thank you also for looking into the issue and sharing your thoughts!
You inspired me to look for hints also in the resulting postscript, I
did not thought of that possiblity in a first place.
−Martin
On Mon, May 25, 2020 at 04:12:30AM +0000, William Bader wrote:
> I looked at the postscript. The error comes from the reference to A in the
> sequence
> ---
> 0 3462 0 3462 240 288 60 4021 0 LoutGr2
> 1 ldiaglinkbegin
> [ 0
> 0
> { A } { B }
> 0.8 ft 0.8 ft ldiaglinepath ] 0.2 ft [ /ldiagsolid ] 0.04 ft ldiaglinkend
> ---
> I suppose it is generated by "@Link from { A } to { B }" which means that one
> of the other lout commands, maybe "@CTR
> at { 1960 4 } { A:: @Node outline {} }" is not generating a definition of A
> in the postscript.
> I don't know enough lout to get any further.
> Regards, William
>
>
>
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> From: Lout-users <lout-users-bounces+williambader=hotmail.com@nongnu.org> on
> behalf of Martin Michel <martin@famic.de>
> Sent: Sunday, May 24, 2020 3:57 PM
> To: lout-users@nongnu.org <lout-users@nongnu.org>
> Subject: Rectangular zones in graphs
>
> Hi there,
>
> I want to highlight a certain "corridor" in a graph. In other words, a
> zone in the range [y1:y2] should have a different colored background or
> be overlayed by a semi-transparent box. I wonder if that is possible at
> all with the Lout @Graph and @Diag calls. The user manual states it is
> possible to place any arbitrary object in a grap, however, I have a hard
> time figuring out how this should work. I even fail to draw a box inside
> the graph, see this try expanding the example of the manual. My task is to
> mark the band between 4 and 5 on the y-axis, but using @Node outline and
> @Link fails with `undefined error: unknown or misspelt label? Command:
> A` when piping the lout output to ps2pdf. Is this approach correct at
> all or do I have to use @Box, other coordinates … ?
>
> @SysInclude { graph }
> @SysInclude { diag }
> @SysInclude { doc }
> @Doc @Text @Begin
> @Diag {
> @Graph
> abovecaption { New South Wales road deaths, 1960--1990
> (fatalities per 100 million vehicle km) }
> objects {
> @CTR at { 1960 4 } { A:: @Node outline {} }
> @CTR at { 1990 4 } { B:: @Node outline {} }
> @CTR at { 1990 5 } { C:: @Node outline {} }
> @CTR at { 1960 5 } { D:: @Node outline {} }
> }
> {
> @Data points { plus } pairs { dashed }
> { 1963 5.6 1971 4.3 1976 3.7 1979 3.4 1982 2.9 1985 2.3 1988 2.0 }
> }
> @Link from { A } to { B }
> @Link from { B } to { C }
> @Link from { C } to { D }
> @Link from { D } to { A }
> }
> @End @Text
>
> Any help is welcome, thanks for it in advance!
> −Martin
>