Re: Very difficult axes inversion?? How to???

• To: mathgroup at smc.vnet.net
• Subject: [mg31770] Re: [mg31729] Very difficult axes inversion?? How to???
• From: BobHanlon at aol.com
• Date: Sat, 1 Dec 2001 02:45:43 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```Needs["Graphics`Graphics`"];

HRTheory={
{3573.42,-0.878527},{4086.85,-0.633543},{4630.97,-0.409946},
{5162.98,-0.204436},{5754.68,-0.0146906},{6361.21,0.160644},
{6960.8,0.32215},{7499.38,0.471442},{8030.84,0.615737},
{8637.59,0.771511},{9345.72,0.960848},{10321.5,1.19904},
{11631.1,1.4834},{13189.3,1.79744},{15106.,2.12376},
{17278.5,2.45063},{19637.2,2.77995},{22496.1,3.09186},
{25936.9,3.39425},{28536.6,3.68696},{32814.3,3.97022},
{36058.,4.24443},{40228.,4.51006},{44778.7,4.76756},
{49424.5,5.0174},{54922.6,5.26},{60345.4,5.49577},
{66276.8,5.72506},{71871.1,5.94823},{80980.7,6.1628},
{88540.6,6.37483}};

HRTheoryScaled=
(HRTheory/.{x_,y_}:>{x/1000,y});

p1=(LogLinearListPlot[HRTheoryScaled,
Frame->True, Axes->False,
PlotStyle->RGBColor[1,0,0],
DisplayFunction->Identity] /.
{x_?NumericQ,y_?NumericQ}:>{-x,y});

xTicks = (
((FrameTicks/.AbsoluteOptions[p1])[[1]])/.
{x_?NumericQ,lab_,rem__}:>{-x,lab,rem});

Show[p1,Frame->True,Axes->False,
DisplayFunction->\$DisplayFunction,
FrameTicks->{xTicks,Automatic,None,Automatic},
PlotRange->All];

Bob Hanlon

In a message dated 2001/11/29 10:42:41 AM, jrhamilt at Mines.EDU writes:

>Bob!  Thank you so much, However.....  I made a fairly stupid mistake....
>
>I actually need to flip the x axis, and I'm not sure how to generate my
>own ticks, AND make them a log scale...
>
>----- Original Message -----
>
>From: <BobHanlon at aol.com>
To: mathgroup at smc.vnet.net
>To: <jrhamilt at mines.edu>; <mathgroup at smc.vnet.net>
>Sent: Thursday, November 29, 2001 5:33 AM
>Subject: [mg31770] Re: [mg31729] Very difficult axes inversion?? How to???
>
>> In a message dated 2001/11/29 2:54:38 AM, jrhamilt at mines.edu writes:
>>
>> >I'm in desperate need of flipping the axes for both the these graphs
>> >(the y axes) so they count down, not up.
>> >
>> >I've seen lots of solutions, but none of them seem to work in 4.0 or
>> >with a LogLinearListPlot....
>> >
>> >Any ideas??
>> >
>> >Below is the code I'm using, I included one of the lists so you can
>see
>> >
>> >how it looks...
>> >
>>
>> Needs["Graphics`Graphics`"];
>>
>>
>HRTheory={{3573.42,-0.878527},{4086.85,-0.633543},{4630.97,-0.409946},{5162.
>\
>> 98, -0.204436},{5754.68,-0.0146906},{6361.21,0.160644},{6960.8,
>>         0.32215},{7499.38,0.471442},{8030.84,0.615737},{8637.59,
>>         0.771511},{9345.72,0.960848},{10321.5,1.19904},{11631.1,
>>
>1.4834},{13189.3,1.79744},{15106.,2.12376},{17278.5,2.45063},{19637.2,
>>         2.77995},{22496.1,3.09186},{25936.9,3.39425},{28536.6,
>>
>3.68696},{32814.3,3.97022},{36058.,4.24443},{40228.,4.51006},{44778.7,
>>
>4.76756},{49424.5,5.0174},{54922.6,5.26},{60345.4,5.49577},{66276.8,
>>         5.72506},{71871.1,5.94823},{80980.7,6.1628},{88540.6,6.37483}};
>
>>
>> HRTheoryScaled = (HRTheory /. {x_,y_}:>{x/1000,-y});
>>
>> p1 = LogLinearListPlot[HRTheoryScaled,
>>       PlotStyle->RGBColor[1,0,0],
>>       DisplayFunction -> Identity];
>>
>> yTicks = ((Ticks /. AbsoluteOptions[p1])[[2]] /.
>>         {y_?NumericQ, lab_?NumericQ, rem__} :> {y, -lab, rem});
>>
>> Show[p1, Ticks -> {LogScale, yTicks},
>>     DisplayFunction -> \$DisplayFunction];

```

• Prev by Date: Re: Behaviour of Plot/ListPlot & Export
• Next by Date: Re: OOP Revisited
• Previous by thread: Re: Very difficult axes inversion?? How to???
• Next by thread: shuffling a deck of cards