Hello,
I have script to make multiple histograms using stacked data. The y-axis used in the histogram is the stacked data column :Data, the x-axis used in the histogram is the stacked data column labels :Chemical Compound. Then I use Page (:Sample ID) to separate my graphs into one graph per sample. Depending on my dataset that I'm using the script for, I may have 2 samples, or 100 samples. My graphs work fine, however, I would like the y-axis to be in log scale. I've tried multiple ways of inserting code to do this, however, the most I've gotten to work is 1 graph in log scale, while the others are all linear. I've attached the code. The part that is sort of working is the 'ScaleBox (2),'. It changes the first graph to log, however, it leaves the remaining scales as linear. If I change the (2) to a (3) after 'ScaleBox' then the second graph in the group changes to log while the others remain linear. If I remove the (#) after 'ScaleBox' altogether, then none go to log. I've also tried inserting 'Left Y Log Scale (1)' into the Variables area but nothing.
I've attached a dataset to run with the script. Any help with this would be appreciated!
Thank you,
Graph Builder(
Show Control Panel( 0 ),
Variables( X( :Chemical Compound ), Y( :Data ), Page( :SampleID ) ),
Elements( Bar( X, Y, Legend( 10 ) ) ),
SendToReport(
Dispatch(
{},
"Data",
ScaleBox (2),
{Scale( "Log" ), Format( "Best", 10 ), Min( 0.01 ), Max( 80 ), Inc( 1 ),
Minor Ticks( 1 )}
),
Dispatch( {}, "400", LegendBox, {Set Title( "" )} ),
)
);