Excel data representation, Axis labelling non-numeric - excel

I wanted to display my data from my Excel spreadsheet graphically, in the form of a scatter chart.
I know that Excel can do this, but there is one "special feature" about my coordinate system of my graphic, and that is that one of the axes should be labeled with "words" (instead of numbers) to match my table similar to the picture. But I am not sure if Excel can process this at all, I guess that Excel can only work with numbers on the axes.
I would be very grateful for any help and tips and also alternatives!

By definition, the axes in an XY Scatter plot are numeric. But your desired chart can easily be created by adding a helper series to the plot. Assuming the current Y values for the other series are the numbers 1 to 6 for even positioning, you can use a range with Y values 1 to 6 and X values of zero and add that data range as a new series to the plot.
The plot points will sit right on the Y axis. Remove the Y axis labels in the Axis formatting options. You can then use data labels from the worksheet and position them to the left of the plot points of the helper series. Finally, format the markers of the helper series to have no fil and no line to make them invisible.

Related

How to set different horizontal (category) labels for each different product in MS Excel line chart

I am plotting a line graph for 3 different products in MS Excel. The x axis is revenue and the y axis is cummulative p/l. The problem is that when I set the horizontal (category labels) for each of the products (series), it also sets the same range for the two remaining products. The range for the horizontal axis for the last product that i set, modifies the horizontal ranges for the rest. The output (chart) that i get shows all lines reaching a maximum of that x value for the last set product.
Please advice me.
Thank you
A line chart has a categorical X axis. It can also use dates, but I'm not even sure if Excel 2007, which you are using, has that feature or if that came later.
In a category axis, the values of the cells don't matter. They are all in the same position.
If you want to plot the X axis points based on their value, you need to create an XY Scatter chart instead of a line chart.

Use text as horizontal labels in Excel scatter plot

I am trying to make a scatter plot in Excel with text as horizontal axis labels.
I have the data
and I want a chart like this
The way I produced this chart was to have a scatter plot with numeric X values and numeric Y values, so instead of Poland I have X=1 and Y=10, Y=11, Y=12, and Y=9. For Germany I chose X=2 and Y=8 and Y=7. I just added some text boxes with the names to hide the numeric X values.
But I want this to be dynamic, so I tried to set the X value labels here:
but I am not able to change the horizontal values.
How can I solve this problem?
You need a helper series. Consider the following screenshot:
The blue dots are plotted from the data in the table on the left. The orange dots are plotted from the helper table. Each orange dot then has a data label assigned. Edit each data label individually, type a = character and click the cell that has the corresponding text.
This process can be automated with the free XY Chart Labeler add-in. Excel 2013 and newer has the option to include "Value from cells" in the data label dialog.
Format the data labels to your preferences and hide the original x axis labels.

Can't align x-axis on hybrid scatter/area chart

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.

How can I customize the horizontal axis values in excel?

So I am trying to make a nice line graph for some data that I have. Each line has 100 data points, so excel automatically makes the horizontal axis from 1-100. I want to change the min/max values for the horizontal axis from 0-1, without moving the frame of the graph (i.e. without zooming in the graph). I just want to divide the horizontal axis numbers by 100 in order to rescale the time. This is what my graph looks like now:
http://imgur.com/33KD7RY
So I want to change the numbers on the horizontal axis to be fractions or decimals in the range [0,1]. Does anyone know how I can do this, or any other graphing software that would allow me to do this (I have tried using google sheets, but they have less options to customize axes than excel). Thank you!
Did you use two column to plot one line and did you use the Scatter with smooth lines chart type?
Have one column (X) go from 0 to 1 using intervals of 0.01 and your data in your second column (Y). When using a scatter with smooth lines chart type your answer should look like this:
image graph
Plotting your second line in the same chart can be done the same way by adding it through the 'select data' options of the chart.

Highlighting data range whille retaining original data label axis

So I'm not sure whether this can be done or not, but I want to highlight certain scatter plot points on my graph whilst still retaining the original axis labels. This is a little snip of my data:-
(0.5,0.525] 272
(0.925,0.95] 116
(0.975,1] 446
(1,1.025] 2840
(1.975,2] 974
(2,2.025] 1400
I have a scatter plot of the first column as my x-axis and the second column as my y-axis. Currently I'm highlighting the points that I want (such as (1,1.025] 2840by adding it as a new legend entries series, but to get it to align horizontally with the original data I've had to number all the points from 1 onwards and add the horizontal axis labels that way, so that all the points that are highlighted mask the other points behind it that contain the horizontal data labels. Is there a way of overcoming this without formatting the data for the x-axis numerically? Or a way of incorporating the data labels separately?
Just to illustrate the problem, I've attached an image at the end of this post. The columns mzRange and Frequency on the left handside were used to plot the graphs, whilst the columns on the right handside of the graph were used to highlight the points on the bottom graph. However, as the x-axis is labelled with the bin ranges from the column on the left, it goes up in a numerical fashion as seen with the numbers on the left most column, meaning I have to use the position number of the bins to then place the highlighted points (as seen with the column on the right handside of the graph that goes 18,34,36 etc) which in turn hides the information of the m/z bin range. Hope this makes sense.
The data in the mzRange is not numeric. If it is used as the data source for the X axis, it will result in the data points being numbered ascending on the X axis.
The only way to plot over a data point is to use the exact X and Y values as the original data point. You could mark the highlights in a column next to the original mzRange column and then plot the whole column.
See this screenshot:
Note how the X axis has nothing in common with the values of column B, although that was used as the data source for the X axis. The red dot highlights are placed in the rows that determine the position on the X axis. This way, the label that appears when hovering over the data point remains intact.

Resources