Data brushing in MS excel - excel

I'm using MS Excel 2019 and I'm trying to copy only coordinates of specific selected data points in a scatter plot. Does anyone know whether this is possible. Any possible workaround if possible? My input to the Excel scatter plot are basically x and y coordinates in all 4 quadrants.
Data used:
x
y
-2
-10
39
-8
56
10
34
8
-89
-8
43
5
-9
4
45
3
67
-16
-87
-19
Scatter plot:
What I need is basically select specific points in the first quadrant as mentioned in the red circle from the Excel plot itself and export the selected data points value to separate table. The mouse pointer hover on each point shows its value, but I can't capture multiple data points value using mouse.

What about creating a helper column, which only allows coordinates in the first quadrant? You can achieve this, using following formulas:
in C2 : =IF(AND(A2>=0;B2>=0);A2;0)
in D2 : =IF(AND(A2>=0;B2>=0);B2;0)

Related

Best way to plot multiple categorical data in Excel

I have this data, which contains information from 0 to 10 on how good is a party, according to people interviewed.
The columns represent the counts of each value that the person answered.
(Label of the Data)
Party_Name 1 2 3 4 5 6 7 8 9 10
(Observations)
PartyA 120 46 79 70 49 144 42 10 9 4 8
PartyB 119 38 74 79 51 135 39 19 5 1 1
The problem is that I have over 15 parties. What should be the easiest way to plot all of them?
I've tried plotting them like this:
But I'd would like keep the bars the same colors, and maybe plot the other parties on the same plot, but with 2 by row, or something like that, and also label the bars with the numbers from "0-10".
I hope I've made myself clear.
I think what you are looking for is a clustered column chart:
The way that you would set this up, would be to change the chart type to "Clustered Column":
Then to add the data labels, you would right click on one of the bars, select "Add Data Labels." Then right click the bar again and select "Format Data Labels." It should pop open the right hand pane to edit details related to data labels. Check "Category Name" and then uncheck "Value."

Create a graph in Excel - y variable is binary?

I am trying to create a graph where:
X1 5 10 15 20
X2 10 20 25 30
Y 0 1 1 0
X1 is a minimum value of something, X2 the maximum, and Y the binary outcome--was my event true or not. In my head I picture it as a scatter plot where the horizontal axis is my min, the vertical my max, and there is a color coded dot that shows whether the event is true or not. I can't seem to create this.
I am not aware of a way to do this directly in Excel. As a workaround, you could sort your data by column Y. Then make a scatter plot of the the data where Y=0. Then you manually add the data where Y=1 as a second "series", i.e. right click the chart and click on Select Data, then on Add (Excel 2007).

Generate x, y coordinates from input parameters

I am trying to overlay patient data on top of an optical image. I need to assign X,Y coordinates for each patient file in a bunch of designated boxes in the optical image.
I am currently doing this by hand but I wanted to try and do this automatically by giving Excel the starting coordinate (for the upper left corner pixel of each box), the number of rows and columns for the box as well as the spacing between each pixel. I would need the X and Y coordinates in separate cells.
For instance, for a box with 3 rows, 4 columns, pixel spacing of 20 and starting coordinates of (20,50), the output should look like:
X Y
20 50
40 50
60 50
80 50
20 70
40 70
60 70
80 70
20 90
40 90
60 90
80 90
According to your description maybe:
Formulas:
A8:
=IF(ROW(1:1)<=$B$1*$B$2,$B$4+MOD(ROW(1:1)-1,$B$2)*$B$3)
B8:
=IF(A8,$B$5+$B$3*INT((ROW(1:1)-1)/$B$2))
Both formulas copied downwards as needed.
Transposed version:
Formulas:
B7:
=IF(COLUMN(A:A)<=$B$1*$B$2,$B$4+MOD(COLUMN(A:A)-1,$B$2)*$B$3)
B8:
=IF(B7,$B$5+$B$3*INT((COLUMN(A:A)-1)/$B$2))
Both formulas copied sidewards as needed.

EXCEL Bar Graph - representing only part of the bar graph

Hi I'm trying to create a bar graph on Excel where I can highlight part of the bar graph. For instance, for the following table,
1 100 20 30
2 100 10 20
3 100 5 15
I would like to have the value 100 represented and then on top of that have only between 20 and 30 highlighted (or shaded/colored/etc in differnt color) - showing that the total is 100 and the range is 20 to 30.
For 2, same thing, have 100 represented first, and only have 10 to 20 highlighted, and so on.
Would any of you guys please help me on how to go about it? I tried stacked bar with no fill and such but it does not fulfill my satisfaction. Thank you for your reply in advance!!! :)
Do you want something like this?
If so, convert your data to this format:
1 20 10 70
2 10 10 80
3 5 10 85
Use a stacked column chart and set the first and the third series to the same color.

3D Plotting from X, Y, Z Data, Excel or other Tools

I have data that looks like this:
1000 13 75.2
1000 21 79.21
1000 29 80.02
5000 29 87.9
5000 37 88.54
5000 45 88.56
10000 29 90.11
10000 37 90.79
10000 45 90.87
I want to use the first column as x axis labels, the second column as y axis labels and the third column as the z values. I want to display a surface in that manner. What is the best way to do this? I tried Excel but didn't really get anywhere. Does anyone have any suggestions for a tool to do this? Does anyone know how to do this in Excel?
Thanks
I ended up using matplotlib :)
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
import matplotlib.pyplot as plt
import numpy as np
x = [1000,1000,1000,1000,1000,5000,5000,5000,5000,5000,10000,10000,10000,10000,10000]
y = [13,21,29,37,45,13,21,29,37,45,13,21,29,37,45]
z = [75.2,79.21,80.02,81.2,81.62,84.79,87.38,87.9,88.54,88.56,88.34,89.66,90.11,90.79,90.87]
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.plot_trisurf(x, y, z, cmap=cm.jet, linewidth=0.2)
plt.show()
You really can't display 3 columns of data as a 'surface'. Only having one column of 'Z' data will give you a line in 3 dimensional space, not a surface (Or in the case of your data, 3 separate lines). For Excel to be able to work with this data, it needs to be formatted as shown below:
13 21 29 37 45
1000 75.2
1000 79.21
1000 80.02
5000 87.9
5000 88.54
5000 88.56
10000 90.11
10000 90.79
10000 90.87
Then, to get an actual surface, you would need to fill in all the missing cells with the appropriate Z-values. If you don't have those, then you are better off showing this as 3 separate 2D lines, because there isn't enough data for a surface.
The best 3D representation that Excel will give you of the above data is pretty confusing:
Representing this limited dataset as 2D data might be a better choice:
As a note for future reference, these types of questions usually do a little better on superuser.com.
You can use r libraries for 3 D plotting.
Steps are:
First create a data frame using data.frame() command.
Create a 3D plot by using scatterplot3D library.
Or You can also rotate your chart using rgl library by plot3d() command.
Alternately you can use plot3d() command from rcmdr library.
In MATLAB, you can use surf(), mesh() or surfl() command as per your requirement.
[http://in.mathworks.com/help/matlab/examples/creating-3-d-plots.html]
You also can use Gnuplot which is also available from gretl. Put your x y z data on a text file an insert the following
splot 'test.txt' using 1:2:3 with points palette pointsize 3 pointtype 7
Then you can set labels, etc. using
set xlabel "xxx" rotate parallel
set ylabel "yyy" rotate parallel
set zlabel "zzz" rotate parallel
set grid
show grid
unset key
Why not merge the rows that contain the same values?
-
13 21 29 37 45
1000] -75.2 -- 79.21 -- 80.02
5000] ---------------------87.9---88.54----88.56
10000] -------------------90.11--90.97----90.87
Excel can use that pretty well..

Resources