I am trying to use the data from a csv file as a label for a plot. I am getting the data displayed on the plot but it is not on the same line, it is graduated down. What I want is the 2 x | on the same line with the C on the line above it. Any help appreciated.
This is the code I’m using to generate the plot below
plot 'test-data.csv' using 1:3 w lines, 'test-data.csv' using 1:3:4 with labels offset 0, 5 font "Times,8"
Data file & image of results is attached
Peter
As requested this is the script that generated the image in the request
Regards
Peter
You have plotted each character at the y coordinate of that data point. The data points are not all at the same y, so of course the characters do not line up.
Your "this is what I want" text is at y=0.00000030
To produce that for all labels, use
No additional offset is necessary.
Or how about this. If there were distinct 'open' and 'close' symbols it would be simpler. As it is you must rely on an assumption that the vertical bar occurs exactly twice per label.
That sort of works with your data, but the x-spacing is to close together so the characters making up a label overlap with each other. I don't think you can fix that in a single-pass command. You would have to make one pass over the data to construct the labels, then a second pass to plot them.
Ethan,
Thank you for your suggestions, they have been a big help. It looks as though I will have to use 2 columns of data for this. One for the markers and the other for the C1.2 with an offset.
Regards
Peter