Hello Myriam,
You might find it easier using Graph Builder. Suppose you have a table with the following columns: X, Y, LCL and UCL. Bring up GB on this table. Drag X to the X axis. Highlight Y, LCL, UCL and drag to the Y axis. Click the icon for points, and then shift click the icon for vertical bars. Right-click inside the graph and select Bar > Bar Style > Interval. Then, under Points (left side) click on Variables and deselect LCL and UCL. Under Bar click on Variables and deselect Y. Should look like this:
If you run the code shown below inside a script window you'll get the final result. Uses JMP 11 btw.
New Table( "Untitled",
Add Rows( 10 ), New Column( "X", Numeric, Continuous, Format( "Best", 12 ),
Set Values( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] )
),
New Column( "Y", Numeric, Continuous, Format( "Best", 12 ),
Set Values( [2, 5, 3, 6, 4, 7, 5, 8, 6, 9] )
),
New Column( "LCL", Numeric, Continuous, Format( "Best", 12 ),
Set Values( [1, 3, 2, 2, 2, 5, 3, 7, 5, 7] )
),
New Column( "UCL", Numeric, Continuous, Format( "Best", 12 ),
Set Values( [3, 8, 5, 8, 6, 9, 8, 9, 7, 10] )
)
);
Graph Builder(
Show Control Panel( 0 ),
Variables( X( :X ), Y( :Y ), Y( :LCL, Position( 1 ) ), Y( :UCL, Position( 1 ) )
),
Elements(
Points( X, Y( 1 ), Legend( 4 ), Jitter( 1 ) ),
Bar( X, Y( 2 ), Y( 3 ), Legend( 5 ), Bar Style( "Interval" ),
Summary Statistic( "Mean" )
)
)
);