I have a few dozen data points with an ordinary x and y axis. Now I want to have a secondary x axis for this data set.
That's how I'd like it: bottom (normal) x-axis being the "Time", the y-axis being the "Magnitude", and the top x-axis being the "Air". Attention, the Magnitude values are reversed - this is wanted.
Thank you very much for telling me how this works!
Here's the dropbox link
https://www.dropbox.com/s/dd94769ehg1rq6m/worksheetSecondaryAxis.xlsx?dl=0
Not sure I'm understanding your question correctly, but here goes. To plot the second set of data using the same y-axis and a secondary x-axis, follow these steps in Excel 2010:
1. Add the 2nd data series to the plot, e.g.
=SERIES(,Tabelle1!$D$6:$D$45,Tabelle1!$B$6:$B$45,2)
It will not be visible because it falls outside of your fixed x-scale.
2. Select the 2nd data series. You can do this by clicking on the 1st data series and then using the up-arrow to get to the next data series.
3. The left-most part of the ribbon should now show Series 2. Below that click the Format Selection button to open the Format Data Series dialog
4. Choose the Plot Series on Secondary Axis option
5. In the ribbon choose Chart Tools | Layout | Axes | Secondary Horizontal Axis | More Secondary Horizontal Axis Options
6. Choose appropriate values for min and max (say 1.0 and 1.6 for your data).
7. Select the secondary Y-axis (on the right of the graph). Format the Horizontal axis to cross at the max value (-13.18 in my case).
8. In the ribbon choose Chart Tools | Layout | Axes | Secondary Vertical Axis | None to hide the second y-axis.
9. Select any other formatting options you want for the 2nd x-axis
Hope this helps --- here's my result
Related
Please have a look at This Excel chart. Here is a screenshot:
Here is the data:
There is a scatter series of blue of dots (plus a trendline) and a green area series. The chart data are contained within the series.
The problem I have is that the x-axis values of the two series are not aligned. For example, the second and third blue dots at x = 3.1 and x = 3.8 are in the correct place along the x-axis, but in the green area series they appear to be above x = 2.0 and x = 3.3. How to fix this?
Change the Scatter to a Line Chart, then format Line Color so that there is "No Line". Add trendline.
There may be another way to do this while retaining the Scatterplot, I'm not sure, but this seems to be visually what you're looking for, but I think you will need to use a Line Chart for this unfortunately. The problem is summarized in this similar Q on SuperUser:
https://superuser.com/questions/964264/aligning-stacked-bar-chart-w-scatter-plot-data
The short answer is that your combining (unsuccessfully) a categorical series (the columns) with interval/ratio series (the line charts). So, Excel doesn't know how to plot your categories (columns) on an interval scale (the current X axis).
You can verify this by selecting Chart > Layout > Axes > Secondary Horizontal Axis > More Secondary Horizontal Axis Options. Without making any changes to the axes configuration, the second X-axis will now appear along the bottom of the chart, and you can see it is scaled differently from your Scatter data.
I.e., in the Scatter series, the data is X/Y pairs. But in your Area chart, it treats the X-values as categorical, and in this context "1.1" is no different than "Bob" -- it is a cardinal representation of the data rather than an ordinal representation.
The problem I have is that the x-axis values of the two series are not aligned.
So even though the two series appear to share the same set of X-Values, the Chart is simply incapable of treating those as the same type of data. The x-axes are not aligned because they are not the same data or even the same type of data!
All that said, if you change both series to XY Scatter, it is possible (with some extraordinary effort) to apply shading/coloring below a series or between two series, etc.
http://peltiertech.com/fill-under-between-series-in-excel-chart/
http://chandoo.org/wp/2013/02/13/shaded-line-charts-excel/
What you can do is plot the Area graph on a secondary axis. Then go to Chart -> Layout -> Axes -> Display Secondary Horizontal Axis to see the axis, right click for its properties and change the type of the Axis Type to "Date axis". This (kind of) changes the axis to a numerical type, as opposed to a category type.
However, the area graph will still be placed incorrectly too far to the right because Excel will continue to plot the series as a (kind of) category type, with its data points appearing in the centre of each category as opposed to at the correct x value like in an XY scatter plot.
To get the graphs overlaying the most correctly, you can create a Scaled-up x value series which is, say, 1,000 times the original x-values and use this for the x-values of the area plot. By scaling by 1,000 or 10,000, you eventually get the granularity to a point where it looks more like X-Y plot, but is actually an area plot, and the graphs look like they coincide perfectly.
In MS Excel 2010, I have the following data. I created a simple line chart but it uses the data axis automatically (that's what I want). The problem is that the first date (11/25/2015) is right below 0% (of the y-axis) and I don't want that to happen. I want to move the middle area of the chart along with the x-axis a bit to the right so that it doesn't look shabby. How to go about doing this?
I added a new row and then deleted it but the chart automatically adjusts by itself. I have also tried simply resizing the chart. I've also tried creating new rows but I don't know if that's the right way.
Chart Example
select your X axis and right click on it and then select Format Axis from the pop up menu.
in the options screen that comes up on the right you can set your MAX and MIN values so your chart does not resize on you at all or you can limit how much it can resize in one direction. You can also set where the AXIS crosses. now this will apply to where the Y axis crosses.
This information can be set for the Y axis as well by selecting it and repeating this process. When you do it for the Y axis, you are controlling where the X axis will cross.
I have two series of data that should be able to easily share an X and Y axis.
Both series only have 12 unique values that should go on the X axis (one for each month in the 2015 year).
The difference is that Series 1 has only 1 value which corresponds to each month (hence the line graph), while Series 2 has several (for the scatter plot).
I want the scatter plot in the background with the line graph overlayed on top. It took me an hour just to figure out how to combine the line and scatter plot without major formatting issues (when I first tried simply changing the chart type of Series 1 to a line graph, almost all of the scatter plot points just dissappeared out of sight). Now I have it almost perfect, but part of the line graph is hidden behind the scatter points, and I would like to bring the line graph to the front. These are the steps I've taken to get it to this point:
Insert a scatter plot of Series 1.
Click "Select Data", and Add Series 2
Right-click a data point for Series 1, Click "Format Data Series", and in "Series Options", choose to plot the series on the "Secondary Axis". A new Y axis appears on the right side of the graph in addition to the Y axis that was already on the left
Right click a data point from Series 1, click "Change Series Chart Type", and make it a line graph
Delete the right axis on the right of the chart
How can I bring the line graph to the front?
I just replicated your issue and the following worked for me. I had my data set up like this:
Right-click on the Chart and Choose Select Data
Click Hidden and Empty Cells
Choose Connect data points with line and check Show data in hidden rows and columns (EDIT: actually, only need to check Connect data points with line.)
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.
My problem seems simple, I just want to make a column chart with 2 y-axes. When I do this, Excel automatically puts the columns overlapping. I do not want them overlapped! How do I go about correcting this?
An image of what is happening:
I believe this method is more straightforward:
Create two dummy series. Series1 and dummy1 on the primary axis, Series2 and dummy2 on the secondary axis.
Reorder the series so dummy1 is above Series1
You could achieve the chart as shown below with some rather careful manipulation:
Basically is requires spacing out your data as shown in columns A:C but also right-aligning the horizontal axis labels, adjusting the secondary axis maximum (and format of both vertical axes, if necessary) and the Gap Width for Series1 to about 10% and for Series2 to about 5%.
(PS I chose the wrong value for C5.)
I find it easier to change the secondary Y data's chart-type to a scatter plot. The overlap of this symbol with the bars of the primary Y, is the desired result. You simply right click the secondary bar and select "Change the chart type", and select scatter with or without the connecting line.