Bug #1082

pshistogram with one logarithmic axis and -A

Added by Federico 4 months ago. Updated 3 months ago.

Status:ClosedStart date:2017-04-23
Priority:NormalDue date:
Assignee:Paul% Done:

100%

Category:-
Target version:Candidate for next minor release
Affected version:5.3-svn Platform:Windows

Description

I'm not sure to call it a bug because I managed to do it, but I think that anyways is a bug. I am using GMT 5.3.3 r17743 (64-bit) on Windows.

Figure 3: I make an histogram (more precisley hipsometric curve) with a logarithmic curve with the following commands:

REM    Figure 3. Log
SET PROJ=X15c/10c*l*
SET DOMINIO=0/5700/0.01/16
gmt pshistogram -R%DOMINIO% -J%PROJ% -P "temp_datos" > Fig3.ps -bi1f -Z1 -C%color% -F -W50 -Bxafg -Byaf+l"Frecuencia (\045)"

Figure 4: Then, I wanted to add -A (to flip the graph) with the followings commands but I obtained this error:
"pshistogram: Syntax error -JX:x option: Limits must be positive for log10 option".

REM    Figure 4. Log. -A
SET PROJ=X15c/10c*l*
SET DOMINIO=0/5700/0.01/16
gmt pshistogram -R%DOMINIO% -J%PROJ% -P "temp_datos" > Fig4.ps -bi1f -Z1 -C%color% -F -W50 -Bxafg -Byaf+l"Frecuencia (\045)" -A

Figure 5: I managed to obtained the graphic that I wanted by removing the "l" from the Y axis (in PROJ) and added to the X axis

REM    Figure 5. Log. -A    
SET PROJ=X15c*l*/10c
SET DOMINIO=0/5700/0.01/16
gmt pshistogram -R%DOMINIO% -J%PROJ% -P "temp_datos" > Fig5.ps -bi1f -Z1 -C%color% -F -W50 -Bxafg -Byaf+l"Frecuencia (\045)" -A

I found this a bit confusing because I have to indicate the "l" in the X axis (for -J) which will apllied to the values of the Y axis (for -R). I think that would be better to use the syntax of figure 4 to obtain the graph of figure 5.

Fig3.png - Figure 3 (16.9 KB) Federico, 2017-04-23 05:20

Fig5.png - Figure 5 (16.4 KB) Federico, 2017-04-23 05:20

temp_datos - data in binary format (2.33 MB) Federico, 2017-04-23 05:20

Bug.bat - Script (947 Bytes) Federico, 2017-04-23 05:31

History

#1 Updated by Paul 4 months ago

  • Status changed from New to Resolved
  • Assignee set to Paul
  • Target version set to Candidate for next minor release
  • % Done changed from 0 to 100

Thanks, we had forgotten to swap one more setting (the one that held the log/no log setting). Fixed in r18025 and I have added a test script modeled after your Figs 3 and 5.

#2 Updated by Joaquim 3 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF