spotfire newbie_2018 Posted November 14, 2019 Share Posted November 14, 2019 Doing a bar chart with binned measurement valueson X-axis vs. counts on Y-axis and expecting a normal distribution-like graph. I noticed that when counts are zero for certain bins, thesebins will not be displayed onthe X-axis. As a result, a normal distribution-like curve hasbins with "skipped values" for example, 11 Link to comment Share on other sites More sharing options...
Anders Gavare Posted November 15, 2019 Share Posted November 15, 2019 One thing to try could be to changebetween categorical axis mode and continuous axis mode. For example, if you right-click on the X axis and change the Custom expression from to AutoBinNumeric([x],20)it should show up on a continuous scale (with holes where there is no data). (Change AutoBinNumeric to whatever binning function you are using.) Link to comment Share on other sites More sharing options...
spotfire newbie_2018 Posted November 15, 2019 Author Share Posted November 15, 2019 Thanks Agavare. Apparently I did something incorrectly so that once the x-axis gets binned, it becomes categorical and the continuous scale is grayed out. Either right click on the axis or an attempt to change the category axis through the setting in "property" fails. Any other suggestion A great many thanks. Link to comment Share on other sites More sharing options...
Anders Gavare Posted November 19, 2019 Share Posted November 19, 2019 How do you perform your binning What exact binning function are you using Is it in the form of a calculated (string) column Link to comment Share on other sites More sharing options...
spotfire newbie_2018 Posted November 19, 2019 Author Share Posted November 19, 2019 Under "Insert", I selected "Insert Binned Column" and set up "Specific Limits" to bin the measurement into something as shown in the original post 11<x<=11.25, 11.25<x<=11.5, 11.5<x<=11.75 , 11.75<x<=12. The limits were input as follows (separated by semicolon) 11;11.25;11.5;11.75;12;12.25 ... It appears that once the measurement values are binned, which were originally considered as "Real" by the Data Type, the binned group is now considered "categorcial", not "continuous". Link to comment Share on other sites More sharing options...
Anders Gavare Posted November 20, 2019 Share Posted November 20, 2019 That's interesting. The inserted binning column only works in categorical mode, not continuous. Probably because at the level an inserted column works, it has no knowledge of what plot it will be in (possibly several) and/or on which kinds of axes. You could try the following: Go to Data -> Column properties, select your inserted binned column, and copy the BinBySpecificLimits(something something) expression from the gray text box at the bottom of the dialog to the clipboard. Then create a new bar chart, right-click on the X ("Category") axis selector and select Custom expression. Paste in the expression as you copied it from the clipboard. It should now be in continuous mode. Update: In your case, you could even try something like BinByEvenDistance([x],0.25) as a custom expression directly on the X axis. That's easier than manually typing all the limits, if all you want is to divide into bins for each 0.25-multiple. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now