Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: combination of two ContourPlots - impossible?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg33701] Re: combination of two ContourPlots - impossible?
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 9 Apr 2002 01:02:13 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <a8rh5b$b62$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,


how do you like

cnt = Table[z, {z, -500, 500, 1000/24}];
style = Which[# < 0, Dashing[{0.005}],
                                   0 == #, Dashing[{}],
                                  # > 0, {RGBColor[1, 0, 0], 
            Dashing[{0.005}]}] & /@ cnt;


Block[{a = 0.5, b = 0.5, c = 0.5, y = 0}, 
  ContourPlot[
    Evaluate[(x*(x - a) + y*y + z*z)/(Sqrt[(x*x + y*y + z*z)^3]*
              Sqrt[((x - a)^2 + y*y + z*z)^3]) - ((x - a)*(x - a - b -
c) + 
              y*y + z*z)/(Sqrt[((x - a)^2 + y*y + z*z)^3]*
              Sqrt[((x - a - b - c)^2 + y*y + z*z)^3]) - (x*(x - a - b)
+ 
              y*y + z*z)/(Sqrt[(x*x + y*y + z*z)^3]*
              Sqrt[((x - a - b)^2 + y*y + z*z)^3]) + ((x - a - b)*(x - a
- b -
                     c) + y*y + z*z)/(Sqrt[((x - a - b)^2 + y*y +
z*z)^3]*
              Sqrt[((x - a - b - c)^2 + y*y + z*z)^3])], {x, -1, 2.5},
{z, 
      0.001, -1}, ContourShading -> False, PlotRange -> {-500, 500},
    Contours -> cnt, PlotPoints -> 90, ContourStyle -> style,
    AspectRatio -> Automatic, ImageSize -> {800, 450}, 
    FrameLabel -> {"\n Profile  [m]", "\n depth  [m]"}, RotateLabel ->
True, 
    PlotRange -> {{-1, 2.5}, {0, -1}}, AspectRatio -> .5, 
    DefaultFont -> {"Times-Bold", 14}, FormatType -> OutputForm]
  ]


Or you can convert the COntourGraphics[] into a Graphics, select
the lines and combine the lines in one Graphics[] object.

Regards
  Jens


Harald von der Osten-Woldenburg wrote:
> 
> Hi,
> 
> first of all: Thanks a lot for your help. It was really a stupid
> question ( ** --> ^), sorry...
> 
> But I have still a problem and whatever I tried in the last hours, I had
> no success. I want two combine two ContourPlots (plot1: negative values,
> plot2: positive values) and I did the following:
> 
> -----------START----------------------
> 
> Needs["Graphics`Colors`"];
> Needs["Graphics`Graphics`"];
> 
> majorTicks =
>     Table[{x, x, {0.015, 0}, {GrayLevel[0.], Thickness[0.003]}}, {x,
> -1.5,
>         2.5, .5}];
> 
> minorTicks =
>     Table[{x, "", {0.012, 0}, {GrayLevel[0.], Thickness[0.0025]}}, {x,
> -1.5,
>         2.5, .25}];
> 
> obenunten = Join[majorTicks, minorTicks];
> 
> majorTicks =
>     Table[{x, x, {0.015, 0}, {GrayLevel[0.], Thickness[0.003]}}, {x, -1,
> 
>         0, .2}];
> 
> minorTicks =
>     Table[{x, "", {0.012, 0}, {GrayLevel[0.], Thickness[0.0025]}}, {x,
> -1,
>         0, .1}];
> 
> rechtslinks = Join[majorTicks, minorTicks];
> 
> a = 0.5; b = 0.5; c = 0.5; y = 0;
> 
> negpart =
>   ContourPlot[
>     Evaluate[(x*(x - a) + y*y + z*z)/(Sqrt[(x*x + y*y + z*z)^3]*
>               Sqrt[((x - a)^2 + y*y + z*z)^3]) - ((x - a)*(x - a - b -
> c) +
>               y*y + z*z)/(Sqrt[((x - a)^2 + y*y + z*z)^3]*
>               Sqrt[((x - a - b - c)^2 + y*y + z*z)^3]) - (x*(x - a - b)
> +
>               y*y + z*z)/(Sqrt[(x*x + y*y + z*z)^3]*
>               Sqrt[((x - a - b)^2 + y*y + z*z)^3]) + ((x - a - b)*(x - a
> - b -
>                      c) + y*y + z*z)/(Sqrt[((x - a - b)^2 + y*y +
> z*z)^3]*
>               Sqrt[((x - a - b - c)^2 + y*y + z*z)^3])], {x, -1, 2.5},
> {z,
>       0.001, -1}, ContourShading -> False, PlotRange -> {-500, 00},
>     Contours -> 12, PlotPoints -> 150,
>     ContourStyle -> Dashing[{0.005, 0.006}], AspectRatio -> Automatic,
>     ImageSize -> {800, 450}, FrameStyle -> {Thickness[0.003]}, Frame ->
> True,
>     FrameTicks -> {obenunten, rechtslinks, obenunten, rechtslinks},
>     FrameLabel -> {"\n Profile  [m]", "\n depth  [m]"}, RotateLabel ->
> True,
>     PlotRange -> {{-1, 2.5}, {0, -1}}, AspectRatio -> .5,
>     DefaultFont -> {"Times-Bold", 14}, FormatType -> OutputForm]
> 
> pospart =
>   ContourPlot[
>     Evaluate[(x*(x - a) + y*y + z*z)/(Sqrt[(x*x + y*y + z*z)^3]*
>               Sqrt[((x - a)^2 + y*y + z*z)^3]) - ((x - a)*(x - a - b -
> c) +
>               y*y + z*z)/(Sqrt[((x - a)^2 + y*y + z*z)^3]*
>               Sqrt[((x - a - b - c)^2 + y*y + z*z)^3]) - (x*(x - a - b)
> +
>               y*y + z*z)/(Sqrt[(x*x + y*y + z*z)^3]*
>               Sqrt[((x - a - b)^2 + y*y + z*z)^3]) + ((x - a - b)*(x - a
> - b -
>                      c) + y*y + z*z)/(Sqrt[((x - a - b)^2 + y*y +
> z*z)^3]*
>               Sqrt[((x - a - b - c)^2 + y*y + z*z)^3])], {x, -1, 2.5},
> {z,
>       0.001, -1}, ContourShading -> False, PlotRange -> {00, 500},
>     Contours -> 12, PlotPoints -> 150, AspectRatio -> Automatic,
>     ImageSize -> {800, 450}, FrameStyle -> {Thickness[0.003]}, Frame ->
> True,
>     FrameTicks -> {obenunten, rechtslinks, obenunten, rechtslinks},
>     FrameLabel -> {"\n Profile  [m]", "\n depth  [m]"}, RotateLabel ->
> True,
>     PlotRange -> {{-1, 2.5}, {0, -1}}, AspectRatio -> .5,
>     DefaultFont -> {"Times-Bold", 14}, FormatType -> OutputForm]
> 
> ois = Show[negpart, pospart]
> 
> -------THE END----------------------
> 
> why is this possible, or is there another way to do this?
> 
> Again thanks a lot,
> Harry
> 
> --
> Harald von der Osten-Woldenburg
> Geophysical Prospection of Archaeological Sites
> National Heritage Department of Baden-Wuerttemberg
> Silberburgstrasse 193, D-70178 Stuttgart
> Fax Office: +49-(0)711-1694-707
> http://www.lb.netic.de/hvdosten : Geomagnetics, Geoelectrics, Radar, EMI


  • Prev by Date: combination of two ContourPlots - impossible?
  • Next by Date: Re: Re: Particular structure 2
  • Previous by thread: combination of two ContourPlots - impossible?
  • Next by thread: Bayesian?