Plot two time series with same start and end time: data does not align with axis

0

1

I'm trying to plot graphs for pressure and temperature recorded on different devices.

The number of data recorded for each device is different (Eg. pressure has 1 reading per second while temperature has 1 reading per 6 seconds). I want to plot the pressure on primary y-axis and temp.on secondary y-axis for a time period of 144 min (time on x-axis).

Now when i plot the graphs the usual way (Graph type: 2D line), the temp. plots stop somewhere in between the x-axis (I'm assuming the number of data points are insufficient to fill).

Is there a way for excel to decide that each series start and end at same time even if the number of data points are different?

Let me know if any additional inputs required.

web

Posted 2014-10-15T07:27:15.910

Reputation: 3

Can you put in a screen shot and summarize the graph settings (graph type, axis settings, data range definitions)? Is the X axis treating the times as a continuous variable or categories? – fixer1234 – 2014-10-15T08:31:38.670

Graph type-2D line, data range for pressure and temp is visible on the screenshot(https://www.sendspace.com/file/f66ok7). Both press and temp are measure from 0-144 minutes. But since number of data points for temp is less than that for pressure, the temp graph (blue in image) ends in the middle of the chart.

– web – 2014-10-15T09:30:16.560

For the x-axis, I'm using time interval to be 1 second. I converted them into minutes for a clean plot on the chart) – web – 2014-10-15T10:04:46.993

2Just a wild guess--the X axis values are being treated as categories instead of a continuous variable. Try using an XY graph instead of a line graph. – fixer1234 – 2014-10-15T14:30:21.467

Thanks fixer, that worked! :)

Another (bad?) solution I came across was creating a macro for selecting only one value for every 6 rows. This way the number of data points remain same for both temp. and pressure. Only problem is you have to lose some data to plot a simple graph. Just stating it here so others need not look around much. – web – 2014-10-16T05:36:16.860

Glad you got it fixed. It would help other with the same problem if you put your solution in an answer (you're allowed to answer your own question). – fixer1234 – 2014-10-16T05:39:11.527

Answers

1

As indicated in the comments, this was being plotted as a line graph. With a line graph, the X values can be treated as categories rather than a continuous variable. Categories don't have a scale, the axis values are just a series of display positions with labels. In this case, two independent series were plotted on the same axis. Excel doesn't match up category labels for the two data series. The temperature readings had fewer values so they just went into the first positions for as many categories as were needed. The solution is to use an XY graph, where X is always a continuous variable.

fixer1234

Posted 2014-10-15T07:27:15.910

Reputation: 24 254