psxy gives weird results when plotting long time series (8760 records)
Added by Bernt Viggo over 1 year ago
Dear GMT enthusiasts
I am experiencing weird behavior with psxy when I plot long timeseries.
Attached is a file with 8760 records.
When I plot 4000 of these records they come up like expected.
When I plot all of the 8760 records the data is not plotted correctly. Suddenly there are some spikes in the plot.
They are not the values I have in the data (pp.txt file).
This is the code for the ok_plot.jpg
R="0/4001/0/60"
awk ' { if(NR < 4000) print NR, $1; } ' pp.txt | \
gmt psxy -R$R -JX6i/2i -P -K -Bpy10 -Bpx500 > $PSFILE
Code for bad_plot.jpg
R="0/8761/0/60"
awk ' { print NR, $1; } ' pp.txt | \
gmt psxy -R$R -JX6i/2i -P -K -Bpy10 -Bpx500 -W,red > $PSFILE
Am I doing something wrong?
Thank you.
Replies (4)
RE: psxy gives weird results when plotting long time series (8760 records)
-
Added by Joaquim over 1 year ago
Your data file has 1 column only. You need at least 2 columns to do a xy plot, so I don't even know how you actully created those plots
gmt psxy -R0/4001/0/60 -JX6i/2i -P -Bpy10 -Bpx500 pp.txt > lixo.ps
psxy [ERROR]: Mismatch between actual (1) and expected (2) fields near line 1 in file
psxy [ERROR]: Mismatch between actual (1) and expected (2) fields near line 2 in file pp.dat
RE: psxy gives weird results when plotting long time series (8760 records)
-
Added by Paul over 1 year ago
Well, he is using awk to plot that file and supply 2 columns there.
I cannot reproduce any problems using your commands with your file (well, removing -K) - looks good to me. What GMT version are you running?
RE: psxy gives weird results when plotting long time series (8760 records)
-
Added by Joaquim over 1 year ago
Ops, visually skipped that print NR
No problems either for me.
RE: psxy gives weird results when plotting long time series (8760 records)
-
Added by Bernt Viggo over 1 year ago
Paul wrote:
Well, he is using awk to plot that file and supply 2 columns there.
I cannot reproduce any problems using your commands with your file (well, removing -K) - looks good to me. What GMT version are you running?
Paul, Joaquim, thanks, you are the best.
I have investigated this more.
It turns out that I am using EVINCE to view the files.
There are some screen/rendering resolution issues causing this.
When I zoom in and out the plot suddenly displays correctly.
I was not aware of such issues.
So I Guess when plotting high details, the screen/zoom, effects what you actually see. Maybe I should get a new screen.
I am also using x2go, tunneling into the Linux system, maybe some issues here as well.
I am sorry for troubling you. Thanks for all help.
First time I have experienced that what you see is NOT what you get.
It looked wrong , but was correct.
(1-4/4)