Why and when should I use Sliders instead of regular number Inputs? - user-experience

Setting the correct value with a slider is a lot more troublesome than with a regular number input with max and min values. Why are they so widespread? When is a slider a better choice in terms of UX?

The slider can be better when:
User need faster input with predefined values
User can use the only mouse or touchpad
Form need already validated values
Expected users are relatively young

Related

Why do Excel and Matlab give different results?

I have 352k values and I want to find the most frequent values from all of them.
Numbers are rounded to two decimal places.
I use the commands mode(a) in Matlab and mode(B1:B352000) in Excel, but the results are different.
Where did I make a mistake, or which one can I believe?
Thanks
//edit: When I use other commands like average, the results are the same.
From Wikipedia:
For a sample from a continuous distribution, such as [0.935..., 1.211..., 2.430..., 3.668..., 3.874...], the concept is unusable in its raw form, since no two values will be exactly the same, so each value will occur precisely once. In order to estimate the mode of the underlying distribution, the usual practice is to discretize the data by assigning frequency values to intervals of equal distance, as for making a histogram, effectively replacing the values by the midpoints of the intervals they are assigned to. The mode is then the value where the histogram reaches its peak. For small or middle-sized samples the outcome of this procedure is sensitive to the choice of interval width if chosen too narrow or too wide
Thus, it is likely that the two programs use a different interval size, yielding different answers. You can believe both (I presume) but knowing that the value returned is an approximation to the true mode of the undelying distribution.

Excel conditional formatting: set a custom "zero" value in data bars

i would like to set up a data bar in conditional formatting in excel (2013) like this:
however, i haven't been able to select a custom value as the cut-off or "zero" value separating negative and positive values. what i would like to achieve is to show values larger than, say, 60% with a bar extending to the right, and values smaller than 60% with a bar extending to the left.
i don't think excel supports setting a custom "zero" value, so maybe someone knows a hack for this?
my use case is this. i am tracking product usage rates. i know how much of each type of product i have in stock and how much there was after last shipment. based on how much time passed since last shipment, i can estimate how much i should have currently in stock. if the value is below the threshold, that means that usage estimations are underestimated and that on the next shipment more of that particular product should be ordered.
Ok, while I have no idea why you would want to show a value of less than 0.6 going to the left, here is how you do it:
Click on the axis of your table, until all of the axis labels are selected
Right Click -> Format Axis
Change Axis value to "0.6"
Viola!
i managed to achieve that by using two cells for the data bar and tweaking the formulas slightly. this is the effect:
formulas:
first column:
=IF(value<=threshold,threshold-value,"")
second column:
=IF(value>threshold,value,text(value,"#0%"))
conditional formatting:
negative values:
positive values:
in this case my threshold was 70%

Represent the colour of a bit field

Can anyone show me a (language agnostic) way to assign a colour value to a bit field so that comparatively similar bit fields have a similar colour to each other. So for example
01100111
And
01110111
Are close in colour relatively. But
11011001
Is further away
By "further away" I mean distant in hue, saturation, brightness, etc...
If we have an array of all the bit fields then it would be possible to compare them all then produce a set of colours. But what if we don't know and we want one bit field to always be represented by one colour?
Or else we could pre compute all possible colour values for a given number if bits. How would I go about doing that?
You cannot do this, because (essentially) there are only 2 dimensions to your perceived color space, while treating the bits independently as you suggest makes a separate dimension for each bit.

Statistical mean centering - Using total mean or attribute mean

I have a set of data, over 1000 rows and 20 attributes ( shown in columns ).
I am wanting use mean centering, which includes taking the mean away from each value to give a mean of 0. Do I remove the mean on an attribute by attribute basis, or do I remove the mean of all attributes from each?
For example, if the mean of attribute A was 500, and the mean of attribute B was 1,000.
For all values in A I could remove 500, which gives the A attribute a mean of 0. Then I could do the same for attribute B.
OR
I could take 750 off all values for both attributes.
Which is more statistically correct?
My question is due to this:
If I subtract different values from the different attributes, the attributes are then no longer comparable as different amount have been taken from each. If I subtract the same value from all, then some columns may be full of just negative figures ( and so negating the effect of mean centering ).
Thanks,
Typically you would center each attribute individually.
If you center each attribute separately, you are assuming that for an individual, what matters is how each measure differs from the mean of that attribute, and you will lose absolute comparison of attributes for that individual.
For instance if you had person height, weight, centering them separately you could then ask "for a person taller than average, is the weight also larger than average weight". Averaging together height and weight would be meaningless.
One way to think about it is, you are creating an average individual, which you can now use as a benchmark against all your observations.
Now if the absolute value of 2 measures are comparable, say product price and cost, you wouldn't be able to compare them any longer, because they would be shifted. If what you care about is a measure that uses absolute comparisons for an individual observation, you would need to create an auxiliary metric, like for instance %profit. In that case, the centered values would allow you to ask "are products with higher prices more profitable than average".

jasper reports: consistent colors in charts

I am facing this difficulty :
I want to indicate where my user is in a range of data in a chart, as well as where the average is.
That's not too difficult, that part I figured out already :)
However, if I have several charts in 1 report, my "user bar'" sometimes gets a different color, according whether it's below or above average.
This is very confusing for my users, because they can't think, let's say, "the yellow bar is always me".
The legend always has to be read, and that's not so user-friendly.
I'll illustrate the problem in an attachment.
I know how to have the same series color, but within this series, I want 1 particular color to always represent the value of the average, another to represent my user, etc.
Is this possible ?!
Thanks a lot in advance.
IMAGE CAN BE FOUND HERE : http://www.kava.be/cms_bldn/jaspercharts.jpg
EDIT: I'm working with the ChartCustomizer now :
BarRenderer renderer = (BarRenderer) chart.getCategoryPlot().getRenderer();
renderer.setSeriesPaint(0, Color.blue);
renderer.setSeriesPaint(1, Color.yellow);
renderer.setSeriesPaint(2, Color.green);
renderer.setSeriesPaint(3, Color.red);
Still, this handles the series in the order they arrive from the resultset.
What I'm looking for is how I can use the series expression (as entered in 'series expression' field in the categorie series dialogue), instead of fixed indexes like 0-3.
I would suggest checking whether the sequence of your series is same in both the chart's chart data, plus color series in chart properties is also or not.
If it is same than it should print same.

Resources