RE: Plot&2backgroundcolors
- To: mathgroup at smc.vnet.net
- Subject: [mg44329] RE: [mg44262] Plot&2backgroundcolors
- From: "David Park" <djmp at earthlink.net>
- Date: Wed, 5 Nov 2003 10:01:09 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Roberto, For those who have or wish to try DrawGraphics from my web site here is the code for making the type of plot that you describe. Needs["DrawGraphics`DrawingMaster`"] f[x0_][x_] := (x - x0)^2 Module[ {xmin = -1.1, xmax = 4.1, ymin = -1.1, ymax = 7, x0 = 1.234}, Draw2D[ {LightPink, Rectangle[{xmin, ymin}, {x0, ymax}], LightBlue, Rectangle[{x0, ymin}, {xmax, ymax}], Black, Draw[f[x0][x], {x, xmin, xmax}], AbsoluteDashing[{5}], Line[{{x0, ymin}, {x0, ymax}}]}, Frame -> True, FrameTicks -> {Automatic, Automatic, CustomTicks[# &, databased[{x0}]], Automatic}, AxesFront -> True, PlotRange -> {{xmin, xmax}, {ymin, ymax}}, PlotLabel -> "Brambilla Type Plot", Background -> Linen, ImageSize -> 450]]; David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Roberto Brambilla [mailto:rlbrambilla at cesi.it] To: mathgroup at smc.vnet.net Hello, I have to plot a function, let it be Sin[x] in (0-pg), then I have a peculiar abscissa, ex. x=1.234. I'd like to overlap to a normal grid and frame a vertical line at this abscissa in same different style (as dash or color or thickness, etc.) . How can I do it? How can I have also this value explicit as a tick on the plot? Then all this would be even better if I could have two background colors (or gray levels), before and after the selected abscissa. Many thanks in advance, Roberto Roberto Brambilla CESI Via Rubattino 54 20134 Milano tel +39.02.2125.5875 fax +39.02.2125.5492 rlbrambilla at cesi.it