I need more general XY point to point plotting than XY scatter
Hi,
The Error-Bars approach (Method 2 in my previous reply) would work only if
the lines are horizontal (zero slope). If it is not the case, you have to
plot each group (two points) as a separate series (Method 1)
If the lines are horizontal, but the lines don't start on the Y-axis, you
have to use a slight modification to Method 2. To avoid confusion, I have
named the groups as P, Q, R, and S. Supposing tthe Group Names are in Column
A, X-values in Column B, and Y- values in Column D, starting at Row 2.
A, B, C
P, 0.5, 0.5
2.5, 0.5
Q, 0.7, 1.2
2.1, 1.2
R, 0.3, 2.1
2.4, 2.1
S, 0.4, 3.0
2.7, 3.0
Create a new column, D, which would contain the X-Error values as follows:
In D2 enter 0, and in D3 enter =B3-B2, and ENTER.
Now select BOTH the cells, D2 and D3, and auto-fill the formulas down Column
D. For the sample data shown above, the outcome would be
A, B, C, D
P, 0.5, 0.5, 0.0
2.5, 0.5, 2.0
Q, 0.7, 1.2, 0.0
2.1, 1.2, 1.4
R, 0.3, 2.1, 0.0
2.4, 2.1, 2.1
S, 0.4, 3.0, 0.0
2.7, 3.0, 2.6
Now create an XY-Scatter Plot with Y vs X, i.e., Column C vs Col B
Right-click on any data-point -- "Format Data Series" -- click on
"X-ErrorBars" Tab -- under "Display" check "Minus", check "Custom", leave
"+" area blank, and for "-" area, enter the range of Column D (D2:D9 for the
sample data) -- "OK"
This would connect each pair of data-points.
Regards,
B. R. Ramachandran
enter "100" -- "OK"
"spazminator" wrote:
Hmmmm. The Error-Bars thing might have promise -- but I didn't think it was
available in XY plots. I'll try.
No, the real data doesn't start every line on the Y axis. Just my contrived
data.
Thanks for looking.
--
lostinamazeoftwistyturnypassagesallthesame
"B. R.Ramachandran" wrote:
Hi,
Rearrange the data as,
name, X, Y
A, 0, 0
2, 0
B, 0, 1
2, 1
C, 0, 2
2, 2
D, 0, 3
3, 3
and plot Y vs X for each group as a separate series on an XY-plot. Format
each data-series to connect the two points in it.
OR
Rearrange the data as above. Create ONE plot with the entire data series.
Rightclick on any data-point -- "Format Data Series" -- click on
"X-ErrorBars" Tab -- under "Display" check "Minus", check "Percentage" and
enter "100" -- "OK"
OR
Rearrange the data as above, but insert a third X,Y pair (which would be
idential to the first X,Y-pair) in each group.
name, X, Y
A, 0, 0
2, 0
0, 0
B, 0, 1
2, 1
0, 1
C, 0, 2
2, 2
0, 2
D, 0, 3
3, 3
0, 3
Create ONE X,Y-scatter plot for the entire data, and format the series to
connect the data-points. The cross connections such as A-X3-Y3 and B-X1-Y1,
B-X3-y3 and C-X1-Y1, ... will coincide with the Y axis (and hence wouldn't be
a distraction, of course, this would work only if the X-value of the first
point in each group is zero!).
I am sorry for not being able to suggest a more elegant solution.
Regards,
B. R. Ramachandran
"spazminator" wrote:
Here is some sample data (csv):
name,X1,Y1,X2,Y2
A,0,0,2,0
B,0,1,2,1
C,0,2,2,2
D,0,3,2,3
I want to show line segments only between A-X1-Y1 and A-X2-Y2; B-X1-Y1 and
B-X2-Y2 etc, NOT between A-X2-Y2 and B-X1-Y1 or B-X2-Y2 and C-X1-Y1 etc. It
would be cool if the A, B, C, D labels could be visible on the graph, and
even better if I could then paste like data onto the chart, even using paste
special and have it conform, but I've tried many times without success. It
always messes up the new source data with wrong assumptions. Try it.
--
lostinamazeoftwistyturnypassagesallthesame
"MrShorty" wrote:
Can you be more specific as to what you need? I've never had any
trouble plotting an XY plot and having the data points connected by
straight lines. Normally either select the "connected by lines" option
when the chart is created, or select the data series Format-selected
series-patterns tab-select the desired line style to connect the
points.
I almost never use the paste command to add a data series to an
XYchart. I will either use the paste special command (which allows me
to specify that I'm using new or different X data) or use the
Chart-Source data-Series tab to add a data series.
If that doesn't help, then post again with more details about the
problem you are having.
--
MrShorty
------------------------------------------------------------------------
MrShorty's Profile: http://www.excelforum.com/member.php...o&userid=22181
View this thread: http://www.excelforum.com/showthread...hreadid=493208
|