Error with psconvert on Example 2 Profilling

Ouverte
#33 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
25/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
matlab
Domaine
tooling

Piste de recherche

Commencez par exécuter le script MATLAB de Example 2 et l’appel psconvert -TG -P -E300 -A sous Windows 10 avec GMT 6.4 et les versions de Ghostscript indiquées. Examinez l’erreur complète et l’appel système Windows de Ghostscript généré. Le travail est considéré comme terminé lorsque l’exemple s’exécute jusqu’au bout et renvoie les données de l’image et de l’alpha sans l’échec de psconvert.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Description of the problem

I started using the GMTMEX on a windows computer. I start by running the examples from The GMT/MATLAB Toolbox 2017 paper. They all run as described except, for example 2 . When running the following line of code

I = gmt ('psconvert -TG -P -E300 -A', P);

I get the following error.

Full error message

psconvert [ERROR]: System call [@"C:\Program Files\gs\gs10.01.1\bin\gswin64c.exe" -q -dNOSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox -DPSL_no_pagefill -dMaxBitmap=2147483647 -dUseFastColor=true "C:\Users\pdq\AppData\Local\Temp/psconvert_stream_13184.ps" 2> "./psconvert_13184c.bb"] returned error 1.
GMT: Module return with failure while executing the command
psconvert -TG -P -E300 -A
Error using gmtmex
GMT: exiting

I install the latest gs version, before I had the 9.2 version and I had the same error.

Full script that generated the error
Here is the full matlab script

clear; clc; close all
% Read in relief grid and Japan trench location
G = gmt ('read -Tg JP.nc');
T = gmt ('read -Td JP.txt');
% Take gradient in N45E direction to be used for illumination
intens = gmt ('grdgradient -Nt0.8 -A90', G);
% Sample grid along profiles normal to the trench
[profiles, stack] = gmt ('grdtrack -G -C300k/1k/25k -Sm+s+a', T, G);
% Evaluate an asymmetrical color palette with hinge at sealevel
C = gmt ('makecpt', '-Cgeo -T-8000/2000');
% Make the GMT plot
P = gmt ('grdimage', ['-R141/147/35/42 -JM6i -P -Baf -BWSne -I -K -C ' ...
    '--FORMAT_GEO_MAP=dddF'], G, intens, C);
P = gmt ('pscoast', ['-R -J -O -K -W0.25p -Dh ' ...
    '-LjTR+w200k+u+f+c38:30N+o0.5i/0.2i -F+gwhite+p0.5p']);
% Use first and last point of each profile and create a polygon of the area
A = gmt('convert', '-Ef -T', profiles);
B = gmt('convert', '-El -T -Is', profiles);
area = gmt ('catsegment', [A B]); % Join the two segments
P = gmt ('psxy', '-R -J -O -K -Ggreen@85', area);
P = gmt ('psxy -R -J -O -K -W2p+v0.3c+gred+p0.25p+bc+ec', T);
P = gmt ('psxy -R -J -O -K -W0.5p,red+v0.25c+p0.25p+bt+et', profiles);
P = gmt ('psscale', ['-R -J -O -DjBL+w3i/0.1i+h+o0.3i/0.4i -C -W0.001 ' ...
    '-F+gwhite+p0.5p+i0.25p -Bxaf -By+l"km"'], C);

I = gmt ('psconvert -TG -P -E300 -A', P); % Windows Version

figure(1); clf
h = imshow (I.image); set (h, 'AlphaData', I.alpha)
% Figure 1 shows the stacked relief profiles across the trench
figure(2); clf; hold on
for k=1:length(profiles)
    plot (profiles(k).data(:,3), profiles(k).data(:,5))
end
plot (stack.data(:,1), stack.data(:,2), 'LineWidth', 3)
xlabel('Distance (km)'); ylabel ('Depth (m)')
title ('Japan Trench Profiles'); xlim ([-150 150]); grid on

System information

  • Operating system: Windows 10
  • Version of GMT: GMT 6.4
  • Version of GMTMex: Not sure of this, but I am assuming the latest from the GMT 6.4 version
Langage dominant
MATLAB
Étoiles
53
Forks
19
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

  • Aucun Dockerfile ni fichier Docker Compose
  • Propose un modèle de pull request
  • Aucun guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de GenericMappingTools/gmtmex

Toutes les issues de GenericMappingTools/gmtmex

Issues similaires

Plus d'issues MATLAB

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.