Sunday, July 11, 2010

Strange Lines in eps File Print Outs

I can't imagine anyone else needing this post but maybe it'll save some poor soul hours of screwing around too.

I had plots generated in Origin that contained the function 1/r. I put them into the latex document and converted to pdf. Everything looked great in pdf form. When I printed it, vertical lines (slightly slanted) appeared that went from the top edge of the graph to the function. If I opened the eps in adobe and printed it, the lines shifted but were still present. If I printed from Origin they looked fine. If I printed to PDF from Origin, they were fine. If I printed to ps and converted to pdf they appeared again. I knew it wasn't a erroneous data point since they didn't show up anywhere else and shifted position depending on how I converted them.

Solution (sort of):
Use less data points. I was using 1000. The line disappeared when I used 500.

I have NO idea where or what the problem was but there you go.

UPDATE* This problem persists and is total BS!!! The solution above didn't work for another example. What i noticed was it only occurs if there is a lot of data points outside of the plot range. I thought, well maybe for some reason the points outside of the plot area are connecting with the points inside. I though this because only the data range containing points outside the graph had a problem.

Solution! Don't include the full plot range. If you don't include the largest datapoint the stray line changes position, if you dont include the largest 2, it changes again. At some point it will disappear. I don't know how many you need to eliminate but one to a few. The easiest way to do this is to go to the graph, right click, plot setup, click on the offending graph data, click the button that appears next to the range (has 3 dots on it) and change the starting row to not include the first few data points. This way, if you want to rescale the axis to include more data it still remains. The other option is deleting it manually. This is much quicker but not advised.

No comments: