excel chart different spaces between values on OX - excel

trying to make line chart using data
X Y
1 12
3 34
5 56
6 68
9 79
14 98
is it possible to make different spacec on the horrizontal axis?
because now there are same between 1 and 3, 9 and 14 etc..

As Tim Williams stated in his comment, which he should have made into a full-fledged answer:
Use an Excel XY (Scatter) chart. A line chart treats X values as non-numeric labels, while the XY chart treats both X and Y as continuous numeric variables. The lines and markers in XY and Line charts can be formatted the same.

To create a bar chart with differently spaced bars, insert empty rows between your x, y pairs so that the spacing of the data in the rows reflects the distance between the x points. For example, if the [1, 12] pair is in cells A1:B1, place the [3, 34] pair two rows down, in cells A3:B3; [5, 56] would go in A5:B5, etc.
This may produce bars that look too narrow. You can increase the width of bars by first left-clicking on one of the bars to select them all, and then right-clicking and selecting Format Data Series. The second slider in Series Options will change the bar width for the chart.

Related

Add horizontal axis per series in excel

How frustrating is Excel.. working on this for half an hour now.
I simply try to make a frequency plot of two groups, with different colours. On the x-axis I would like to display the subject.ids per bar.
However, if I select a different range for the horizontal x axis per series (series 1 = blue, series 2 = orange) with the subject id, it changes the x-axis in the other series to the same. What in hell am i doing wrong?
3007 1
23121 1
3009 1
3005 1
3011 2
23171 2
3207 2
3102 3
3207 6
13302 7
2411 11
23191 11
3008 11
3106 12
110031 1
110031 1
110030 1
110017 1
110014 1
110008 1
110004 1
110007 2
110035 4
110020 4
110003 4
110036 10
110019 11
110015 21
AFAIK, you cannot put 2 series onto the x axis.
You have 2 alternate ways to solve your problem:
Concatenate each positional pair into a new column and use this as the x-axis label series. It will look like this:
You could use data labels for each series. However, this will add the data to the columns themselves and not the axis (you could put it at the base of the column). To do so, you will need to right click on the graph, select 'Add Data Labels'. By default it adds the value as the label, but you can select the labels, right click to format the data labels and use the 'values from cells' option. Once you do this and play around with the orientation and location of the labels, it will look like this:
For simplicity, I'd go with the first method
Adding a 3rd option; simply put the columns for the axis labels beside each other and when selecting the Data for the Axis Labels, just select both columns instead of the usual 1. It will look like this:

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).

excel:changing the symbol and color of a marker based on grouping

I have a dataset that looks like
ID Vehicle_grp count mpg
000 Car 5 10
Motorbike 20 100
Other 1 25
001 Car 30 60
Motorbike 28 45
Other 85 35
002 Car 100 10
Motorbike 20 200
Other 1 65
etc.
In excel, how do i change the colors and marker symbols used based on the ID and vehicle group. I would like to change colors based on ID, and use a different symbol for each vehicle group (i.e car is circle, motorbike is triangle, and other is cross)
I don't know VBA, so if theres a way to do this through the menus, that would be appreciated
Just make sure you add each series separately. Here are the steps (assume Excel 2007 or greater):
Insert > Scatter
Click the chart > Design > Select Data
Add first series. Series Name = the cell containing 000. Series X Values = cells for count 5, 20, and 1. Series Y values = cells for mpg 10, 100 25.
Add the second series. Series Name = cell containing 001. Series X Values = cells for count 30, 28, 85. Series Y values = cells for mpg 60, 45, 35.
Add the third series according to above.
Following that process gives me:
A little clean-up and formatting, gives me:

need to create salary data with salary bands

looking to create a salary chart for all my employees. should be xy scatter plot with all salary data for my employees grouped by their title. I want floating bar graph representing salary range for that title.
salary data:
employee,title,salary
joe, eng 1, 15000
mike, eng 1, 16000
kelly, eng 3, 25000
steve, eng 2, 20000
jane, eng 3, 30000
michelle, eng 5, 60000
anan, eng 5, 70000
eng level salary band
title,min, max
eng 1, 10000, 20000
eng 2, 15000, 30000
eng 3, 25000, 40000
eng 4, 30000, 60000
eng 5, 50000, 80000
eng 6, 60000, 100000
note i wont have employees in every level, but want to show that level on the chart, the levels should be shown left to right on the graph from eng 1 to eng 6
i am having a hard time to figure out how to do this in excel...your help would be appreciated
We'll make a floating bar chart with the salary bands, then overlay XY scatter points with the individual data.
First, insert a column between min and max salary in the bands table, and use a formula to compute the span between max and min, as shown below. Select the shaded range and insert a stacked column chart. It looks like the top chart below.
Format the chart as follows: Remove the title (or enter something useful). Remove the legend. Change the number format of the vertical axis to 0,"k" (the comma knocks off a set of three zeros). Format the Min series with no border and no fill, so it is invisible. Format the Span series to use a lighter fill color. Change the gap width of the Span series to something like 75.
Insert a column that contains the number of the salary band (or just change "eng X" to "X") as shown below left. Copy the shaded range, select the chart, choose Paste Special from the Paste dropdown on the Home tab of the ribbon, and use the options shown in the dialog below right (add cells as new series, series in columns, series names in first row, category labels in first column). The chart looks like it got a new set of stacked bars; we'll fix it shortly.
Right click the added series, choose Change Series Chart Type, and choose the XY Scatter style with markers and no lines (below left). Select the new series with markers, press the Ctrl+1 shortcut to format it, choose Primary axis, so it aligns nicely with the existing floating bars, and choose a format that stands out. I used a dark blue marker border and white marker fill (bottom left). Add labels using the Excel 2013 option, Label contains value from cells, or in older versions of Excel, install Rob Bovey's Chart Labeler add-in (free from http://appspro.com) to add arbitrary labels. Also, you should stretch the chart vertically to add resolution (below right).

Excel Chart: X and Y Categories

In Excel 2010 is it possible to have X and Y categories in a scatter/line graph?
An example would be Simple, Intermediate, Complex on the X axis and Low, Medium, High on the Y axis and three markers in the plot area corresponding to Simple/Low, Intermediate/Medium and Complex/High.
Thanks.
You have to get some numbers in your dataset. A scatter between to categories is in my opinion can't be plotted and also it doesn't have any utility as such.
You can have your categories on one axis (Say X) and some values in another axis( Say Y), then you can plot the graph.
Your categories should be unique for scatters, if a single category comes more than once excel will auto change the categories to number from 1, 2, 3, ....

Resources