Plots and scaling
- To: mathgroup at smc.vnet.net
- Subject: [mg41548] Plots and scaling
- From: Jan Rychter <jan at rychter.com>
- Date: Mon, 26 May 2003 05:46:26 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I'm confused. The following function, when given a list of ticks, does the tick scaling differently than the final Line scaling. Even though the xloc parameter is the same for all lines, the vertical "final" line comes out in a different place from the tick lines if xloc is nonzero. Why would that be? rangeLine[{ymin_, ymax_, xloc_}, {rmin_, rmax_}, ticks_] := Prepend[Map[ Function[p, With[{ y = p[[1]], style = p[[2]], plen = p[[3]][[1]], mlen = p[[3]][[2]] }, With[ {ty = ymin + (y - rmin)(ymax - ymin)/(rmax - rmin) }, Line[{Scaled[{0, 0}, {xloc, ty}], Scaled[{plen, 0}, {xloc, ty}]}]; Line[{Scaled[{0, 0}, {xloc, ty}], Scaled[{-mlen, 0}, {xloc, ty}]}] ] ] ], ticks], Line[{Scaled[{xloc, ymin}], Scaled[{xloc, ymax}]}]] I'm using David Park's DrawGraphics package to actually produce the graphics. The function that produces the ticks is CustomTicks from that very package. --J.