From thomas.braun at virtuell-zuhause.de Fri Dec 13 04:27:29 2019
From: thomas.braun at virtuell-zuhause.de (Thomas Braun)
Date: Fri, 13 Dec 2019 13:27:29 +0100


Subject: Lines Styles in Legend
In-Reply-To: <2D7315C9-4B39-42B9-B049-744392DA3D79@ohsu.edu>
References: <2D7315C9-4B39-42B9-B049-744392DA3D79@ohsu.edu>
Message-ID: <a360ec17-7c47-7b02-53b4-594506f383f3@virtuell-zuhause.de>

On 12.12.2019 07:15, Paul Tratnyek wrote:
> Is there an escape code that will draw lines, with different styles and other properties, in a legend box.
>
> I know I can draw the lines with the drawing tools, but I?d like use them as part of a legend.

You can plot the desired styles in one graph and use it in another.

Something like

Function Dostuff()
Make/O/N=2 fake = p
Execute "Graph0()"
Execute "Graph1()"
End

Window Graph0() : Graph
PauseUpdate; Silent 1 // building window...
Display /W=(175.5,633.5,570,842) fake,fake
ModifyGraph mode(fake)=4
ModifyGraph rgb(fake)=(1,52428,26586)
EndMacro

Window Graph1() : Graph
PauseUpdate; Silent 1 // building window...
Display /W=(162,372.5,556.5,581)
Legend/C/N=text0/J/A=MC "\\s(Graph0.fake)\r\\s(Graph0.fake#1)"
EndMacro

does that here. In case I got the question right ;)

I'm using IP8 on Windows.