The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Re: [mg4441] a question on ContourPlot
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Allan Hayes

Posts: 1,508
Registered: 12/6/04
Re: [mg4441] a question on ContourPlot
Posted: Jul 30, 1996 2:59 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"David E. Burmaster" <>
Subject: [mg4441] a question on ContourPlot
> I have made a complicated contour plot (on linear axes) that I
> would like to convert to semi-log axes....
> This does NOT work:
> Show[ plot/.{a_, b_} -> {a, Log[b]}]
> That command converts the y-axis but does not transform the
> contours.....
> Could anyone pls suggest another approach?


cp = ContourPlot[x^2 -y^2, {x,.001,2}, {y,.001,2.72}]
cp contains only a matrix of heights from which the polygons and
lines are constructed. It also has the option
MeshRange -> {{0.001, 2.}, {0.001, 2.72}}.
The only effect of
cp/{a_, b_} -> {a, Log[b]}
on cp is to change this option to
MeshRange -> {{0.001, 2.}, {-6.90776, 1.00063}}
which, in the display, merely changes the y-axis ticks, as you found.

However if you generate the contour lines and polygons (used for
shading) explicitely
gcp = Graphics[cp]
lgcp = gcp/{a_?NumberQ, b_} -> {a, Log[b]}
will alter these elements as you want.

(You can see the internal form of cp... by using InputForm[cp] ...)

Allan Hayes

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.