I have 10.000 numbers in a txt file,from 0 to 36 and want to color them like they are on a roulette table.Can you give me hints what is the easiest way to do this?ANY method will do it.
Related
I want a software to be able to convert a given "pipetted" input color from a photography with a HSV-representation into a human-readable descriptor of a base color. So no matter which combination of HSV-values I pick from a color wheel, it would be converted to the closest "neighbor" of a given, limited number of base colors.
Maybe this is a similar question, because it also ennumerated base colors?
I have to find the nearest color. For example, I have two colors colorA1, colorA2 which are nearly same color. And also I have other color colorB1.
And I need such a method:
Color getNearestColor(colorA1, colorA2, colorB1). This method should give me the colorB2 which is calculated by using the difference of colorA1 and colorA2, then using their distance it should give me colorB2 which has the same distance as in colorA1 and colorA2.
Can you give some ideas how to implement it?
To find the nearest colour, you need a definition of "near", so a metric.
In Wikipedia you will find different metrics of color differences.
Personally I would use the 2*R*R + 4*G*G + 3*B*B. (no need for square roots, you will just compare same metrics). Easy to calculate, you can use just integers (if you use 32 bit integers, you will have no overflow).
Then find which colour has the smallest differences between your target colour.
The other methods are more precise, but in that case "RGB" is not enough. You need to know which colour space are using (probably you are in sRGB).
I've been trying the most simple of things, creating a scatter plot in excel.
I have one x-values and on set of y-values. Yet somehow excel thinks it knows better and creates its own set of x-values ranging between 0-10. Whereas my x-values range between 40-140. Manually changing the limits of the x-axis to 40 - 140 simply makes it so I don's see my data points any more, since excel change my x-values.
Label X Y
A 47 3.5
B 95 40.5
C 47 10.5
D 95 21.5
E 91 21.5
F 45 18.5
G 91 61.5
H 45 0.5
I 130 40.5
J 90 10.5
See picture for clarification.
How do I fix this!?
When copying and pasting data into a column it is important to ensure your data is coming across in the right format to be recognized by Excel. Simply setting the format in the ribbon to numeric from general does not change the way the data is stored. It merely changes the way the data is displayed.
When excel gets data in an unexpected format, strange things happen. Scatter plots become line plots because its seeing the X-axis as text instead of numbers. One way to spot this is if the numbers are not on the right side of the cell when no formatting has been applied to the cell. Another test would be to use a formula like the ones below assuming your data is in cell C3:
=ISTEXT(C3)
or
=ISNUMBER(C3)
On a side note, any number stored as text that is sent through a math operation will be converted to a number for the calculation. So one trick to convert a number stored as text is to use something like:
=C3+0
=C3*1
=--C3
Another option for converting columns of numbers stored as text is to use the Text-to-columns feature in the ribbon. On the last step it will give you the option to format the expected output to something excel will usually handle. This is really good for bringing across dates that are text and need to be converted, or numbers containing thousand separators like , or [space].
The most reliable method that I have found to ensure that the data to be plotted is numeric is to insert a 1 in an empty cell, copy it with ctrl-C, select the columns and choose Paste Special > Multiply. Any text data becomes numeric.
After verifying all my X (any Y) values were actually numbers, I found a solution:
Right click on plot, Change Chart Type (FYI: Scatter with Straight lines was already selected), Change to Line Type.
Now repeat. Right click on plot, Change Chart Type, Change back to Scatter
You will lose the X axis Minimum and Maximum Bounds and the "Vertical axis crosses" value, but at least this works!
FINALLY I FOUND AN ANSWER THAT HELPS HERE.
use =VALUE(cell reference) to make sure the xAxis values are seen by excel as numbers. Until this was done, my xAxis numbers were just spaced evenly across the axis.
I have a small table of 300 rows, 2 columns - score and label. The label is 0 or 1, the score is between 0 and 100. I want to see the difference in the distributions. I want to know if label 0 is more likely to get a low score. Which chart would do the best job here?
Ideally, I would want to see the dots of each label in a different color and hopefully see blue dots on one side and red dots on the other (if the data is fantastic)
Thanks!
Edit: This is an example of what I was hoping to get (taken from google images after googling "ggplot 2 groups")
example
You can really use any chart to show that data if you truly only want to see the distribution of label scores.
I have 3 columns of data, eg:
http://i.stack.imgur.com/XjGmu.jpg
When Excel creates a line graph of this, the blue line is what i get.
This is not correct because the time stamp shows the time when something is switched on (255) or off (0) (could also be the current state eg 16:08). So I'd like a graph like this - see the red line (with a time-based X axis off course):
http://i.stack.imgur.com/vNvPk.jpg
Anyone can help? Thanks
As #Jon49 indicated, you need to plot additional data points--two y values for each x value: one to plot the point at y=255 and one to plot y=0.
If the time-span of the data is at least a few days, you can use a line chart. But in your case since the values are within a day, the scatter chart with straight lines is the only option due to the limitations of the scale units for line charts.
The key is the values need to be in the correct order. Each y=255 value needs to be followed by the next time-stamp's 255 value followed by it's 0 value, followed by the next time-stamp's 0 value:
Excel doesn't support this type of discrete value graph (at least not excel 2k3 that I am using); your best bet is to use a bar graph and then go into the settings and set the gap width down to zero.
Not sure what the best way is but I would automate what I describe below on how to do (unless this is a one time deal, then just brute force it):
Separate the 255s from the 0s. Make sure for every 0 time there is a corresponding 255 time. Take the zero times and put in a scatter plot then add a y-error bar and make the fixed value equal to 255. Format to how you like it.
Now for the 255s. Add those to the chart by pairs. Make the chart type for these pairs scatter plot with a line. Format how you would like them to look.
Let me know if that doesn't make sense to you.