0

I need to create a line chart from some tabular data. The chart should show how weather (e.g. temperature) changes with time. But for some reason the result looks strange (I have attached a picture). Also, the chart displays hour part of the datetime as 0.

enter image description here

Addition

The time is in format Date of type "3/14/01 13:30"

I also tried a Scatter, and the result looks better, but datetime is weird, and it is missing hours: enter image description here

6
  • 1
    I think this is better suited for SuperUser... but it seems the date format of the first column is wrong, so it can't parse the dates correctly. Commented Feb 10, 2014 at 16:06
  • Can you tell what is wrong about the date format? Commented Feb 10, 2014 at 16:18
  • Made some addition to my question. Commented Feb 10, 2014 at 16:28
  • Just tried this in both excel and libre office: Just created a new document, pasted your data, created a new line diagram, and it looked good. Maybe you mis-configured something. How does it look when you create a new document with that data? Commented Feb 10, 2014 at 16:50
  • 1
    The format is fine. Excel recognizes it as a date and time value. The problem is Excel line charts truncate date-time values to dates, so all data for one dat are plotted in the same horizontal position. Hence your vertical lines at each date. Commented Feb 14, 2014 at 20:23

1 Answer 1

0

Plotted as Scatter with Smooth Lines:

SO21682040 first example

Format the x-axis Major unit to Fixed 0.125 to show 3-hourly intervals (any more detail and the chart would be very cluttered).

@Jon Peltier (who knows all there is to now about Excel charts and MORE) has made the point that smooth lines may be misleading. (Inadvertently I provided an example of just that here!) So a slightly simplified version with straight lines for the sake of a better answer for the OP and also for comparison:

SO21682040 second example

with straight and smooth overlaid:

SO21682040 third example

Sign up to request clarification or add additional context in comments.

6 Comments

I tried it, please see result added to my question.
0.125 was not enough, I made it 2.125, and now it works. Thanks. But how did you make it sloping?
For some reason, when I used 0.125, it was all black squeezed together.
I guess I just have too much data.
@pnuts Not only should the segments be straight, but there should be markers where data has been measured, so anyone looking at the chart understands the data. Sure, the in-between is affected by the actual points, but there's error in the points' positions too. Which is correct? Who knows, so it's less likely to deceive or confuse with markers and straight lines.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.