       Re: plot question

• To: mathgroup at smc.vnet.net
• Subject: [mg72702] Re: plot question
• From: Peter Pein <petsie at dordos.net>
• Date: Tue, 16 Jan 2007 02:23:15 -0500 (EST)
• References: <eofj7u\$hdb\$1@smc.vnet.net>

```dimitris schrieb:
> Hello!
>
> Consider the following graph of the function -ln(|x|).
>
> Plot[-Log[Abs[x]], {x, -2, 2}, PlotRange -> {Automatic, {-1, 3.5}},
> Axes -> False, Frame -> True, PlotPoints -> 100, FrameLabel -> {"x",
> "y"}]
>
> How is it possible to make the y-axis point downwards (I need this
> because in half-space problems within the solid mechanics the possitive
> vertical axis is pointed into the half-space)?
>
> Dimitris
>

Hi Dimitris,

unfortunately I've just found this complicated FrameTicks option:
(Note, that -f[x] has to be plotted)

Block[{lbl},
Plot[Log[Abs[x]], {x, -2, 2}, PlotRange -> {Automatic, {-3.5, 1}},
Axes -> False, Frame -> True, PlotPoints -> 100, FrameLabel -> {"x", "y"},
FrameTicks -> {Automatic,
lbl = Flatten[{#1,
If[IntegerQ[#1], {ToString[-#1], {3/400, 0}}, {"", {3/800, 0}}]}, 1]&
/@ (Range[-15, 5] / 5), None, lbl /. _String -> ""}]]

But I'm sure, David Park will find an elegant solution :-)

Peter

```

• Prev by Date: Nonautonomous ODEs
• Next by Date: Font Problem
• Previous by thread: Re: plot question
• Next by thread: Re: plot question