MS Excel 2010 - XY Plot and Bar Chart Together and Dates don't match - excel

I have an XY plot in Excel with some water level data, and I wanted to add a set of precipitation data as bars to help correlate changes in water level. However, there is no option to add dates for the precipitation data, and the bars don't have the same scale as the water level data. I tried using Julian calendar dates to resolve the issue, but that didn't help. How can I fix this?

Water level and precipitation both as Y vs dates as X?
Make a line chart of both sets of data. Right-click on the precip series in the chart, choose Change Series Chart Type, and select a column type. If the scale is way off, you can format the precip to go on the secondary axis, so it will be plotted on the right axis scale.

Related

How do I graph scalable data on both the x and y axis of a bar chart in Excel?

I am having issues creating a Bar graph in Excel. Currently, the Y-axis is a 'series' value input allowing for salability whereas, the x-axis is a 'categorical' input. I am trying to graph the 1st year earnings (y-axis) for each major at two Universities(UF-USF) with the number of graduates at the universities on the x-axis. I'm using the same population data for both so the columns overlap and can compare degree earnings between the universities. I managed to create a graph that has a "scaled" x-axis but, it's still categorical data so I cannot manipulate it- Figure 1. I want to make it look like Figure 2 while displaying the disproportionate number of graduates per the three degrees on the far right. I've already considered other graphs but must have a bar chart.
Figure 1: 'Scaled horizontal axis with Categorical input
https://gyazo.com/8e8d97bc2696113071d487ed96212b61
Figure 2: Overlapping University Bar Chart(Categorical X-axis)
https://gyazo.com/f1fbdebee4b1c4df27471c812d04da0e
Figure 3: Alternate Bar Chart without University Overlap (Categorical X-axis)
https://gyazo.com/3ed448c369827c0dd056fc151444df06
Figure 4: Data
https://gyazo.com/73ace8e16f481b5776a333911084b8a1
The 1st year, 5th year and 10th year earnings are in the data set. Until this is figured out, I'm only graphing 1st-year data.
Thank you!

Excel Chart - Do not Hide Horizontal Data Label

I want to plot a simple chart with Date on the X axis and Number on my Y axis. Tried XY scatter but Excel try to be smart and hide my data labels.
Also, Excel tried to re-order my Date which I do not want.
Date POS
22/10/2017 7
01/10/2017 14
08/09/2017 8
11/08/2017 6
28/07/2017 4
09/07/2017 3
26/06/2017 4
09/06/2017 11
19/05/2017 8
23/04/2017 8
02/04/2017 5
19/03/2017 1
19/02/2017 3
05/02/2017 10
30/01/2017 8
08/01/2017 3
20/11/2016 13
11/11/2016 7
28/10/2016 12
16/10/2016 5
30/09/2016 7
16/09/2016 3
27/08/2016 8
14/08/2016 13
24/07/2016 3
17/07/2016 7
17/06/2016 2
27/05/2016 4
24/04/2016 16
10/04/2016 1
27/03/2016 2
04/03/2016 4
19/02/2016 4
24/01/2016 1
03/01/2016 1
Would like to see everything. Is it possible ?
Thanks.
To answer your questions:
Brief:
1) You can't see all your data labels on the X axis unless you format the X axis to have major interval of 1.
2) With a scatter plot, you cannot have your original labels retained on the X axis and, in your case, as your dates are recognised , they are ordered as such. You would need to convert the dates to text and plot as a line chart without the line.
Solution:
1) Right click X axis and set the major interval to a balance between the amount of detail you want to see and that which is legible. To see all data points, with data that are whole numbers, then 1 should do it, but may become very crowded, so a trade-off.
2) To stop the re-ordering of your dates: The trick is to convert your dates to text using =TEXT(A2,"dd/mm/yy") where A2 is a data point for the X axis etc. In the picture below, this is showing above B39, as I have transposed your original dataset, but the formula was pointing at your original vertical dataset. If that makes sense.
You arrange your data horizontally with each data point in its own column (i.e. transpose your original data set) and then plot this as a line chart and right click format data series > no line. Making sure markers are visible.
On an old Mac with Excel 2011, similar process for Windows and later Excel, removing the line would look like:
And you can select a line colour and add it back in:
Reference i gave in comments which reminded me to transpose the data is scatter-chart-with-one-text-non-numerical-axis
To be honest, if you are going to plot a line chart which has one axis which appears to be dates, it may confuse users if those dates are not then in order.
I recommend to convert all values to date and graph away with standard scatter plot...if you treat the dates as text, and then graph only the entries, then the variance between the dates can be very misleading (unless there are no gaps, 100% consistent).
Below is a snippit of text and of dates with your provided data. It is nearly identical, but not quite. If your data set is larger and there is larger variation between date entries then it will definitely provide a misleading chart.
If you go with the text path, change to line chart, hide line, set color to markers, and put the max interval to 1.
If you go with the date path, then you will not be able to read the x-axis with each date explicitly stated. There would be too many dates to display. You could add data labels to display in the plot area instead of the x-axis, but it is clutter.
You have stumbled across what many also find, that Excel stinks as a graphing tool. This is because about 10 years ago, Micro Soft went stupid and started trying to make software that is "really helpful for the user" translate "makes stupid decisions we don't want". One case in point is your problem.
Excel Line charts are not line charts; they are bar charts that just use lines instead of bars. The issue at hand is how different chart types treat the X-Axis. How you treat the X-Axis determines what kind of chart you use. There are basically only two kinds of X-Axis: discreet/continuous (aka. category/value). For example category would be something like color (RED/BLUE/GREEN). There is no "distance between colors" (what is the distance between red and blue?). Where as numbers and time have a concept of distance inherent in them. For example: how many days are there between jan-1-2001 and jan-10-2001? or What is the distance from the 10 yard line and the 20 yard line?
The problem is that to use charts in Excel, you have to know how each chart type treats the X-Axis. Most people would expect the LINE chart to treat the X-Axis as a value, but MS is not most people so they decided to treat it like a category (unless it is a date more on that in a moment). So, you cannot plot a number X-Axis on a line chart. You should use the XY SCATTER chart instead. Scatter chart in Excel assumes both axis are numbers and thus plots your numeric X-Axis in the expected manner.
if you use a line chart (or bar chart) and you double click your x-axis values, or right click them, you can go to their format axis page where you will see that you have the choice of treating the x-axis as text or dates, but not numbers. This is why when you sort your data differently in a line chart or bar chart, the chart changes, it is because the x-axis is being treated as a category and categories are plotted on the chart in the order they are seen in the data. This can be very useful when your x-axis really is a category but then if that were so you would most likely be using bar charts not line charts. My experience is that BAR charts and LINE charts in Excel behave exactly the same so consider that when thinking about using a line chart.
if your x-axis is a category use bar chart or pivot table and exploit sorting.
if your x-axis is a date use bar/line chart and mark it as date in format-axis page.
if your x-axis is a number use scatter chart.
if your data is something else, or you have a specific perspective you want to emphasize, then do some reading about the different chart types in Excel and pick the one that was created to show what you want to show.

Is is possible to create a scatter chart in excel that has a 2 dimensional X axis

I'm trying to create what I would call a Vertical stacked scatter plot or a scatte plot with a 2 dimensional x-axis. I tried using excel's normal charting tools as well as its pivot charting functionality, but I have not been able to crack this one. As anyone had any luck with this type of a chart or can you recommend a tool that can handle it. I've included an image of what I'm trying to achieve below:
The Y axis has months, and the X axis is a combination of Year and Units.
Thanks in advance for your input.
This can be easily handled in Tableau, if you and your users have access to it. For example, using sample Excel data with this format:
Date Units
1/1/2014 10
2/1/2014 20
3/1/2014 30
4/1/2014 40
...
You can create the scatter plot you've shown in your mock-up by doing the following:
Drag Date to Rows and change it to Month level
Drag Date to Columns and leave it at Year level
Drag Units to Columns
Change the Marks type to Circle
Reduce the size of the circles so they look like points
Sort Month according to your preference
Here's a link to a screenshot of the set-up and resulting plot:
screenshot of scatter plot
There are also many formatting options to change the look of the plot.

How to change axis labels' order/sorting in Spotfire?

When I'm making a line chart in Spotfire to get the trend, it automatically sorts my x-axis labels. Is there any way in which I get the same order of the labels as in my data file ?? (Labels are time periods, in MMMYYYY format)
When you create a line chart with a date as the category axis, it only makes sense for the category axis to be sorted by date. Otherwise, the chart would essentially be a scatter chart. One way to group this is to use BinBy<...> function or apply another category on top of your date column so that it segments it.

Excel curve (Showing values at both sides of y-axis)

I have created a curve in Excel 2013.
At the Y-Axis I am showing some values that show the probability for survival for each 100.000 citizen. Now my problem is, that I want to also show it in percentage, at the right side of the Y-Axis.
How do I do this?
Thanks in advance.
Ps. I have added an the curve as an image, so that you can see how it looks at the moment.
Add a secondary (Y) axis:
Create a combo chart with a secondary axis
When the numbers in a chart you created vary widely from data series to data series, or when you have mixed types of data (for example, price and volume), you can plot one or more data series on a secondary vertical (value) axis. The scale of the secondary vertical axis shows the values for the associated data series. A secondary axis works well in a chart that shows a combination of column and line charts.
Combo chart with secondary axis
In Microsoft Excel 2013, you can quickly show a chart like the one above by changing your chart to a combo chart.
Click anywhere in the chart you want to change to a combo chart to show the Chart Tools.
Chart Tools
Click Design > Change Chart Type.
Type group on the Design tab
On the All Charts tab, choose Combo, and then pick the Clustered Column - Line on Secondary Axis chart.
Combo chart with secondary axis on All Charts tab
Under Choose the chart type and axis for your data series, check the Secondary Axis box for each data series you want to plot on the secondary axis, and then change their chart type to Line.
Make sure that all other data series are shown as Clustered Column.
To clarify what is plotted on each of the vertical axes, you can add axis titles.
.
If I understood you correctly, you only need a right axis that shows a percentage scale, with, e.g., the tick mark for 100% at the same level as the tick mark for 100000 on the left axis.
You do not need any additional curves.
Then, you need to:
Create some dummy data. You may use two cells, which will give you a series with a single data point. Use 10 (X range) and -1 (Y range). Depending on the options you selected for your y axis, you may have to set the Minimum value fixed at 0 (you can do this now or later).
Add it to the plot.
Assign it to a secondary y-axis. Right-click on the series, Format Data Series -> Series Options -> Secondary Axis. Or, if you find it difficult to select it this way, select the chart, Go to Format, select the series from the pull-down menu on the top left, and Format Selection.
Format the right axis scale to give you a correct matching with the left scale. Right click on the secondary y axis, set the Minimum fixed at 0, the Maximum fixed at 1.2 (to match the figure you posted), and the number format as Percentage. PS: there will be a tick label "120%" on the right axis. That will not look good for what you are plotting. It will be best to set the Maximum of the left axis to 115000 (say), and the right axis to 1.15 then.

Resources