jmp-l
[Top] [All Lists]

Re: A Robust Way to Adjust X-Y Axis Min/Max/Inc to Display Various Data

To: jmp-l@lists.biostat.wustl.edu
Subject: Re: A Robust Way to Adjust X-Y Axis Min/Max/Inc to Display Various Data Sets?
From: Fred Zhang <ieaggie2009@gmail.com>
Date: Fri, 20 Feb 2009 14:25:34 -0500
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=QAOx0GMcREMrTVMUIucQGwKoShfmsEmFTHZWs41RMlM=; b=KnegNykeO89k5oprVxLc4T3ut9ogpqloEOceuphlmQ5tDQgQN4njMM2lUqkjAkz6PI v+BsbiewqFVilJzvCUD4RrWA0SolYbmzsKGymSmsUjSgxTXgsKVET1Abrml03aazQjEu 8hkyn4scSIxEB5g64F55o1hJBI2YQWnB+yM9Y=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=BjDhKDTG6EyZCZX5xhFyS2MU86CSfWauz02zIPtE7MgQaE5EkeIqe/5jBpPx9HO3FL +EO5LJ8t0y3J55Xp+OHPuIndub6ygNRiC73z9yS4WWtPPIMDH8JSwcLHA3PBDNbWgsho 7pumZVvlrn/KFLktwh8SmYvLJXOkZJOeRco9Y=
In-reply-to: <25e89e790902201110i475644f3i73298fbc27d62890@mail.gmail.com>
References: <25e89e790902191145x5e4d4f27uc403198af7ba1eee@mail.gmail.com> <1235074788.390.1301344399@webmail.messagingengine.com> <25e89e790902201110i475644f3i73298fbc27d62890@mail.gmail.com>
Thanks, Michael.
 
I am now using your code by appling to my own table with specific column names.
 
 Please note that the table has 4 column. Each has a very long business related name.
Now in the code, I change the name of column 4 (Y in regression) , followed by plotting.
Now I need to change the Y axis title to be the original lengthy name.
How can I do that in the Overlay Plot command?
Also, if I want to add an overall title within the graph, can "text" be applicable? I tried and it failed.
 
Best, and have a wonderful weekend.
Fred
----------------------------------------
col_list = dt << get column names;
col = Column(4); col << Set Name("Y");
::t_biv = Bivariate(Y( :Y), X(Quarter Index),Invisible,Fit Line( {Line Color( "Red" )} ));
::t_biv << (curve[1] << save predicteds); col_list = col_list = dt << get column names;
Overlay Plot(X( :Intro Quarter), Y( :Y, :Predicted Y),
 :Y(Overlay Marker Color( 0 ), Overlay Marker( 0 ) ),
 :Predicted Y(Connect Points( 1 ),Show Points( 0 ), Connect Color( 3 ), Overlay Marker( 1 ) ),
 SendToReport(
  Dispatch({},"101",ScaleBox,{Scale( Linear ), Format("Best"), Min(1), Inc(4)}),
  Dispatch({},"102",ScaleBox,{Scale( Linear ), Format("Currency", 10.0), Min(0),Inc(3000000)}),
  Text("Value");
              )
);
Current Data Table() << Delete Columns(col_list[5]);
------------------------------------------------------------------------------

 
On Thu, Feb 19, 2009 at 3:19 PM, Michael Benson <mbenson@one.net> wrote:
If you do not specify the Min, Max, and Increment in JSL then JMP will
scale the axes automatically. If you are doing the same kind of thing as
in your original question then you may need to specify an increment of 1
to get all the labels to be displayed.

Michael

----- Original message -----
From: "Fred Zhang" <ieaggie2009@gmail.com>
To: "Michael Benson" <mbenson@one.net>
Cc: jmp-l@lists.biostat.wustl.edu Date: Thu, 19 Feb 2009 14:45:36 -0500
   Subject: A Robust Way to Adjust X-Y Axis Min/Max/Inc to Display
   Various Data    Sets?

Michael

Thank you so much.

I have tried and tailored to my problem which works well.

Oh, by the way, I have another display problem. Now I am using the same
JSL code to plot the same type graphy over various data sets, which are
far way different on the range from one to the other. Sometime, the JSL
code with specified Min/Max/Increment on both X and Y axis works for one
data set, however, for other dataset, the display looks ugly and I have
to manually adjust the axis setting.

So is there any good way in JSL to automaticelly set up the Axis to fit
the data range?

Best, Fred

On Thu, Feb 19, 2009 at 10:03 AM, Michael Benson
<mbenson@one.net> wrote:

> Try the script embedded in the JMP table I sent. It really does work,
> though it can be improved.
>
> Michael
>
> ----- Original message ----- From: "Fred Zhang"
> <ieaggie2009@gmail.com> To: mark4flies@aol.com
> Cc: jmp-l@lists.biostat.wustl.edu Date: Thu, 19 Feb 2009 08:33:27 -
>     0500 Subject: Re: [jmp-l] How to change x axis values by another
>     column?
>
>  Hi, Mark
>
> Thank you very much for the sample code. I tried your script and ran
> the following one, but cannot get the lable shown in the X-axis as
> expected.
>
> Anything I missed in the code? Should I add more operations in the
> Bivariate command?
>
> Best, Feng
>
> ------------------------------------------------------
>
> dt = Current Data Table*()*;
>
> labels = Column*(1)* << Get Values;
>
> values = Column*(2)* << Get Values;
>
> Eval*(*Substitute*(*Expr*(*Column*(2)* << Value
> Labels*(*vvv,lll*)*;*)*,
>
> Expr*(* vvv *)*,As List*(* values *)*,
>
> Expr*(* lll *)*,labels *
>
> )
>
> )*;
>
> Bivariate*(*Y*(* :column*(3)* *)*,X*(* :column*(2))*,Fit Line*)*;
>
> ------------------------------------------------------
>   ID              X              Y 00Qtr1 1 1.4 00Qtr2 2 1.5 00Qtr3 3
>   1.46 00Qtr4 4 1.6 01Qtr1 5 1.54 01Qtr2 6 1.58 01Qtr3 7 1.69 01Qtr4 8
>     1.6 02Qtr1 9
> 1.62
>
> On Wed, Feb 18, 2009 at 4:59 PM, Mark Bailey
> <mark4flies@aol.com> wrote:
>
> > You want to use the values in column 2 but show the labels in column
> > 1. Here is the script to do it: dt = Current Data Table*()*;
> >
> > labels = Column*(**1**)* << Get Values;
> >
> > values = Column*(**2**)* << Get Values;
> >
> > Eval*(* Substitute*(* Expr*(* Column*(**2**)* << Value Labels*(*
> > vvv, lll *)*; *)*, Expr*(* vvv *)*, As List*(* values *)*, Expr*(*
> > lll *)*, labels *)* *)*;
> >
> > Note: not all JMP axes will respect this column property, but I
> >       don't
> know
> > any other way.
> >
> > On Feb 18, 2009, at 4:24 PM, Fred Zhang wrote:
> >
> >  Sorry not to get your point. Given this example, which column
> >  property to add? How to do this in JSL?
> >
> >
> >   Mark
> >
> > *They hate you if you're clever, and they despise a fool* ("Working
> > Class Hero" - John Lennon)
> >
> > =
>


<Prev in Thread] Current Thread [Next in Thread>