RE: spanning braces in graphics?
- To: mathgroup at smc.vnet.net
- Subject: [mg41503] RE: [mg41480] spanning braces in graphics?
- From: "David Park" <djmp at earthlink.net>
- Date: Fri, 23 May 2003 03:26:01 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Gianluca, We can use a curly brace, but I don't know off hand how to increase the length without increasing the thickness. Module[ {pt1 = {1, 1}, pt2 = {5, 4}}, Show[Graphics[ {AbsolutePointSize[5], Point[pt1], Point[pt2], Text[StyleForm["\[UnderBrace]", FontSize -> 300], (pt1 + pt2)/2, {0, 0}, pt2 - pt1]}], AspectRatio -> Automatic, Frame -> True, PlotRange -> {{0, 6}, {0, 6}}] ]; But why not design a graphical primitive that connects two points. brace[p1_, p2_] := Module[{j, v}, j[{x_, y_}] := {-y, x}; v = p2 - p1; Line[{p1 - 1/40j[v], p1 - 1/10j[v], p2 - 1/10j[v], p2 - 1/40j[v]}] ] Module[ {pt1 = {1, 1}, pt2 = {5, 4}}, Show[Graphics[ {AbsolutePointSize[5], Point[pt1], Point[pt2], brace[pt1, pt2]}], AspectRatio -> Automatic, Frame -> True, PlotRange -> {{0, 6}, {0, 6}}] David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Gianluca Gorni [mailto:gorni at dimi.uniud.it] To: mathgroup at smc.vnet.net Anybody knows if we can insert spanning curly braces between two given points in a 2D Mathematica plot? It would be a graphics-typesetting combination. Horizontal or vertical braces would be fine already for my purposes. Gianluca Gorni