How to create a text based Y axis on excel chart - excel

I wish to customized the Y-axis to text instead on value.
Is there any way I can do it without any plugin?
Here will be my data:
A B C D
1 Lower Limit Upper Limit # Data
2 30S 40S A1234 30A
3 30S 40S A2345 30S
4 30S 40S A1256 30S
I wish my Y axis will be 30S, 30A, 40A, 40S intead of 10,20,30,40
and my X axis will be A1234,A2345,A1256
Is there any possible that I can change the X axis value?

I started with your data, and I added a small lookup table. I inserted a column "Value" (blue text) in your data range that has the Y value corresponding to the label in your "Data" column. You can use a lookup formula for this, for example, the formula in D2 is:
=INDEX($H$2:$H$5,MATCH(E2,$I$2:$I$5,0))
I made a column chart (don't know what type of chart you want, but this technique is widely applicable) using the yellow shaded range in the first data range (top left chart). I selected and copied the green shaded range in the second data range, selected the chart, and used Paste Special to add the data to the chart, using the settings shown in the dialog overlying the top right chart.
This has added another set of columns (bottom left chart), not so useful. I right-clicked the added series, picked Change Series Chart Type from the pop-up menu, and changed just this series to an XY scatter type (bottom right chart).
The XY scatter series is on the secondary axis, also not too useful. I formatted the XY series, and changed the axis to Primary (top left chart below). The 0.5 values in column G make the points line up with the vertical axis of the chart.
I added data labels to the XY series, shown in orange to distinguish them from the black axis labels (top right chart below). I formatted the labels so they appear to the left of the points, and so they used the Value from Cells option, based on the labels in I2:I5 (middle left chart below). If you don't have Excel 2013, you don't have this option, but you could
Manually type the desired text into the labels.
Link each label to the desired cell: select the labels (one click), select the desired label (second click), type = in the formula bar, select the cell, press Enter, repeat for all labels.
Use a third-party add-in like Rob Bovey's free Chart Labeler from appspro.com.
I hid the default axis labels. You can select None for axis labels, and then resize the plot area to make room for the custom labels created above. But I used a custom number format for the axis, which consisted of several space characters enclosed in double quotes. See middle right chart below.
Finally I rescaled the vertical axis so its min and max were 0 and 40 and the major spacing was 10, I formatted the XY series to use no markers, and I changed the label font color back to Automatic (bottom chart).

Related

How to do an Arrhenius plot using excel-VBA? AKA: How to do a reciprocal x-axis in excel-VBA?

I want to write a program to transform temperature dependend data into an Arrhenius plot. An Arrhenius plot show the logarithm of a property that is thermally acitavted versus the reciprocal temperature aka 1/T. Now is 1/T something that most people are not used to. This is why most of the plot also contain the translation in temperature on a second axis. Usually on top of the graph. The output should look like this:
Picture Source
The second axis is only for better readability and is corresponds to the primary axis with the relation:
primary=1/secondary
secondary=1/primary
What I am not able to do in excel-VBA (excel 2010) is the reciprocal second x-axis. There is no predefined axis scaling like this. There is xlScaleLinear and xlScaleLogarithmic for the property ScaleType of an axis. Is there a way to do this?
A secondary problem is that this:
Dim CH As Chart
Set CH = Tabelle2.ChartObjects(1).Chart
CH.ChartType = xlXYScatterLinesNoMarkers
With CH
.HasAxis(xlCategory, xlSecondary) = True
End With
Does not seem to work. Which means that a xyScatterplot does not seem to have a secondaryXaxis enabled.
I could try to add the lables and ticks myself using forms but this seems a little to much pain, I cannot be the only one who has encountered this problem.
Problem 1: How to format an axis reciprocal (1/x)?
Problem 1b: How to properly add a second x axis in a XYscatterplot?
You can do this by creating a fake axis using a series with data labels (inspired by https://peltiertech.com/secondary-axes-that-work-proportional-scales/):
Columns A and B are your data. Column C matches the X-ticks of your primary X-axis. Column D is =1/C2 etc and column E is the y-axis maximum for your chart. Now simply create a new series of columns C and E, format it to have no line and in this case I chose the + marker but you can create your own vertical line marker if you want it to be exact. Then add data labels set to range column D.
I don't think you'll find another way to do it without this hack, but it's really not that hard and doesn't require VBA which is always a plus in terms of readability / audibility of your workbook.
Another alternative would be to use the data labels to write the actual temperature to the data points:
Column C has the temperature in Celsius.
Since the Arrhenius plot is only defined as ln(k) against 1/T, this would be a good option I think.

Excel chart with only x axis and empty space beetween points

I need to draw Excel chart with only x axis and empty space between the points.
For example I will have points on x axis (1,3), (5,8), (9,10)
The line should go from 1-3 then empty then line from 5-8 then empty then line from 9,10
I tried something with Scatter graph but didn't manage to do it.
Basic-lay Y axis can exist but I will always use the same value
Any ides?
Here is screenshot to get the idea. It is not connected to mentioned points
Chart Example
In chart example points would be (3,5) , (7,8)
You can do something like this:
First in your data, add a empty row in your data where you want the space (row 10 in my example).
Choose a "Scatter plot with Straight Lines and Markers"
Then format your axis (right click on x-axis and choose format axis) to "Units" -> "Major": 1.
Notice how my empty space creates a gap between the two series (5,8) and (9,10).

Excel scatter plot

Hello and good day to all
I have question related to excel graph. I have some set of values like this
Now I want to plot these values as a scatter graph. I want to to draw in such a way that by keeping X values same and 4 different Y plots i.e. A, B, C, D in a single graph. Meaning I dont want to merge these Y values on a single X value. Is there any way to do that? I thank you for your time and help.
The data does not make much sense. All X values are exactly the same, so all data markers will be at exactly the same X position.
To create a scatter chart with multiple series:
- select the data from A1 to B11
- insert a scatter chart
- select the B, C, D ranges (C1 to E11) and copy
- select the chart and use Paste Special > insert as new series with series name in first row
Since all X values are the same, many data points overlap and are not distinguishable.
Edit after comment: if you do NOT want to plot the values at their true X position (i.e. the value 1.4), then use four pairs of X / Y coordinates. Use X values 1 to 4 with A to D. Then use text boxes to replace the X axis labels or hide the labels and show the legend instead.

How to put two x,y coordinate values as one in scatter chart in excel

I want to do something like this
I want to make a point x,y coordinate for one and x,y for another and show two points in a single scatter chart.
I am unable to figure out how to do this
x y x2 y2
1 1 1 8
From data above I need to show two points (1,1) and (1,8)
Depending on your data layout, the data points can be added as one series or as two series. Steps vary with your Excel version.
Try this: click an empty cell that has no data in neighbor cells. Click Insert > XY Scatter chart. This will create a blank XY chart. Now add the series.
Right-click the chart > Select Data > Add > select the range(s) for the X and Y values. Repeat for any other series.
If the data is in one contiguous table, you only need one series.

How to draw a "Line with Markers" graph like this?

Please view this image (focus to red around area):
I cannot get it to work with the letters, but I can get it to work with numbers (=CODE(A1)-CODE("a")+1):
UPDATE after reading Jean-François's answer (but on another computer):
Added a second series just for the custom labels
Show data labels for the new series
Explicitly set the Y axis minimum at 0
Deleted the original X axis labels
Deleted the legend entry of the second series
A few more steps and we're there:
multiplied the X axis values by 10, to adjust granularity for positioning stuff
subtracted 5 for series1 values, to get the data in the middle between major tick marks
played with series2 values, to get the labels also in the middle between major tick marks
Here's an easier way.
Set up the data like this:
Select the first two columns (blue) and insert a column chart (zero value columns do not appear):
Select and copy third and fourth columns (red), select the chart, Paste Special as new series, check first column and first row boxes (it's added as another column):
Right click new column series, choose Change Series Chart Type, and select the XY with Lines style:
Right click XY series, choose Format Data Series, change to Primary Axis:

Resources