cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
miguello
Level VI

Strange Behavior of Set Scale on Plot Col Box

Consider this Plot Col Box:

Names Default To Here( 1 );
New Window( "Example", pcb = Plot Col Box( "Probability", {0.325, -0.146, 0.251, 0.411} ) );
pcb << Set Scale( -1, 1 );

It runs OK and sets scale as expected.

But as soon as I have all the numbers positive - it ignores the Set Scale:

Names Default To Here( 1 );
New Window( "Example", pcb = Plot Col Box( "Probability", {0.325, 0.146, 0.251, 0.411} ) );
pcb << Set Scale( -1, 1 );

All bars are starting from "0" and scale is definitely not going to "1". I'm using it to show correlations for various categories on many plots, and grasping the whole picture at once is quite important - so these plots that are out of scale are kinda breaking the whole picture.

Any way to fix it?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
miguello
Level VI

Re: Strange Behavior of Set Scale on Plot Col Box

Apparently for all positive numbers to show on scale from negative to positive number you need to first set values on both sides of zero, then set the real values, then set the scale. Like so:

Names Default To Here( 1 );
New Window( "Example", pcb = Plot Col Box( "Probability", {-1, 1}) );
pcb << Set Values({0.325, 0.9, 0.251, 0.411});
pcb << Set Scale( -1, 1 );

Weird...

View solution in original post

1 REPLY 1
miguello
Level VI

Re: Strange Behavior of Set Scale on Plot Col Box

Apparently for all positive numbers to show on scale from negative to positive number you need to first set values on both sides of zero, then set the real values, then set the scale. Like so:

Names Default To Here( 1 );
New Window( "Example", pcb = Plot Col Box( "Probability", {-1, 1}) );
pcb << Set Values({0.325, 0.9, 0.251, 0.411});
pcb << Set Scale( -1, 1 );

Weird...