Comments (23)
👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. We appreciate that you took the time to contribute!
from gmt.
We may have a bug but can't check your case because you didn't provide the temp.txt
file. Can you please reduce this to a one line command showing the problem (no need for the -X, fancy -B etc)
Also notice that your makecpt command says -T-4.5/-1.4/0.2
. This will be an error in GMT6
makecpt [ERROR]: Syntax error -T option: (max - min) is not a whole multiple of inc
from gmt.
We may have a bug but can't check your case because you didn't provide the temp.txt
file. Can you please reduce this to a one line command showing the problem (no need for the -X, fancy -B etc)
Also notice that your makecpt command says -T-4.5/-1.4/0.2
. This will be an error in GMT6
makecpt [ERROR]: Syntax error -T option: (max - min) is not a whole multiple of inc
from gmt.
We may have a bug but can't check your case because you didn't provide the
temp.txt
file. Can you please reduce this to a one line command showing the problem (no need for the -X, fancy -B etc)Also notice that your makecpt command says
-T-4.5/-1.4/0.2
. This will be an error in GMT6makecpt [ERROR]: Syntax error -T option: (max - min) is not a whole multiple of inc
The file has now been attached, and the descriptions updated. Thanks for the comments. Could you try it again to see if you can reproduce the pictures ?
from gmt.
Thanks for posting the file. Your commands work fine once you fix your makecpt -T range to be a multiple of 0.2. E.g., -T-4.6/-1.4/0.2. As it is the command fails and no CPT is used in psxy.
from gmt.
Well, I can't really say its working. With the plot size given in the example I see only tiny squares, so I increased things and than found that heads are lost and need to really shrink the head size to colored lines
psxy temp.txt -R-1.1/1.1/-1.5/1.5 -JX15c/21c -Sv0.005c+ea+p-+h0.4 -W0.85p+cl -Ccolourbar.cpt -Baf -BWSne -P > lixo.ps
when I remove the +cl
than we can see nice vector heads but no vector bodies
psxy temp.txt -R-1.1/1.1/-1.5/1.5 -JX15c/21c -Sv0.005c+ea+p-+h0.4 -W0.85p -Ccolourbar.cpt -Baf -BWSne -P > lixo.ps
But heads are still colored although we now are not asking for color.
And, BTW, the +g<fill>
is ignored
psxy temp.txt -R-1.1/1.1/-1.5/1.5 -JX15c/21c -Sv0.5c+ea+h0.4+gred -W0.85p -Baf -BWSne -P > lixo.ps
from gmt.
Well, I can't really say its working. With the plot size given in the example I see only tiny squares, so I increased things and than found that heads are lost and need to really shrink the head size to colored lines
psxy temp.txt -R-1.1/1.1/-1.5/1.5 -JX15c/21c -Sv0.005c+ea+p-+h0.4 -W0.85p+cl -Ccolourbar.cpt -Baf -BWSne -P > lixo.ps
when I remove the
+cl
than we can see nice vector heads but no vector bodiespsxy temp.txt -R-1.1/1.1/-1.5/1.5 -JX15c/21c -Sv0.005c+ea+p-+h0.4 -W0.85p -Ccolourbar.cpt -Baf -BWSne -P > lixo.ps
But heads are still colored although we now are not asking for color.
And, BTW, the+g<fill>
is ignoredpsxy temp.txt -R-1.1/1.1/-1.5/1.5 -JX15c/21c -Sv0.5c+ea+h0.4+gred -W0.85p -Baf -BWSne -P > lixo.ps
In your enlarged version (by using -JX15c/21c,
instead of the original -JX5c/7c),
when testing with the second command (without +cl
), I can still only see black pens, no colour. The vector arrows are too small to be visible because of -Sv0.005c
. Is this what you're talking about in "we can see nice vector heads but no vector bodies" ?
Also, the length of the vector pens is set to be 0.15c, which is provided in the last column of the attached temp.txt file. So when the size of the vector arrows is set too large compared to 0.15c, you will not see the pens. Sorry for this inconvenience.
from gmt.
Sorry for delay, but there still things that I don't understand either. And I'm using GMT6dev so there might some other differences due to it. What I get with my updated version 2) is
psxy temp.txt -R-1.1/1.1/-1.5/1.5 -JX15c/21c -Sv0.5+ea+h0.4 -Ccolourbar.cpt -W0.85p -Baf -BWSne -P > lixo.ps
But I puzzled with this too because:
- It's painting the heads although that is not requested (no -W+cf)
- Don't understand where it's getting the variable color info from. It should be from the 5th column o
temp.txt
but that is a cont value = 0.15 - It's not drawing the vector bodies, or else it's drawing them but they are too small to be seen (5th column?)
from gmt.
I can solve no. 2 for you: Since the dawn of man, GMT has used the z-column when -C is used. For psxy that means the 3rd column, i.e., x, y, z, .... For psxyz it means the 4th column, i.e., it is the column after the point coordinate.
from gmt.
Hi Joaquim, for your 'puzzles', this is my understanding when using version 5.4.3 (there might be some difference if using version 6-dev, but that's beyond my test knowledge at the moment...)
It's painting the heads although that is not requested (no -W+cf)
I think the default option is to paint (fill) the symbol if a CPT is provided. the -W is more about changing the pens (lines). But according to the doc about PSXY, -W+cf also does the symbol fill job, however, it does not necessarily conflict with the default painting option, I guess.
Don't understand where it's getting the variable color info from. It should be from the 5th column otemp.txt but that is a cont value = 0.15
I just saw Paul's comment as writing this, yes, the variable colour is from CPT file as there is a -C. The 0.15 value as the 5th column in the data file is to control the length of the pen of the vector (as I tested)
It's not drawing the vector bodies, or else it's drawing them but they are too small to be seen (5th column?)
The pen of vector is just too small (0.15c) compared to your -Sv0.5c for the vector arrows (heads).
from gmt.
Correct, if -C is given then the heads are filled. However, you can use the +c modifier to -W to tell it to use the color for the stem instead. And, if you also want both stem and head to be colored that way then you need to use +c or +clf.
from gmt.
Correct, if -C is given then the heads are filled. However, you can use the +c modifier to -W to tell it to use the color for the stem instead. And, if you also want both stem and head to be colored that way then you need to use +c or +clf.
This is actually what I wanted, to put both the stem and head be coloured using CPT file. The problem is when using +c for -W, I got the error (version 5.4.3 PSXY):
psxy: Pen modifier found: c psxy: Syntax error: Conflicting -E and -W options regarding -C option application
And when using +cf or +clf for -W, I only got the stems of the vectors, the heads are missing somehow, although in this case, the stems are coloured properly
from gmt.
I can solve no. 2 for you: Since the dawn of man, GMT has used the z-column when -C is used. For psxy that means the 3rd column, i.e., x, y, z, .... For psxyz it means the 4th column, i.e., it is the column after the point coordinate.
Than that means vectors are always colored by azimuth, which is a redundant info with respect to the heads direction. And if -C always fill the head then there is no need for a -W+cf (BTW, there is no +clf in the docs, only +c to do both).
I just saw Paul's comment as writing this, yes, the variable colour is from CPT file as there is a -C. The 0.15 value as the 5th column in the data file is to control the length of the pen of the vector (as I tested)
No, as per the manual 5th column is the header length when ... Direction (in degrees counter-clockwise from horizontal) and length must be found in columns 3 and 4, and size, if not specified on the command-line, should be present in column 5.
But since the size was given (-Sv0.5c) my question is what was the 5th column used for.
from gmt.
No, you are free to place whatever you want in col 3. If your "z" value is kept in some other column then you are expected to use -i to say so. Giving x y az length with -C will give an error (not enough cols) but in your case there are more cols and everything is shifted over by one, as per the way -C works. If you give x y az length value and -C then you are saying "I want az to be used for color, my azimuth to be length and length to be value. You get what you ask for.
from gmt.
So the manual clearly needs to provide that information because now it only says (no mention to shuffling the z column around)
-Sv
vector. Direction (in degrees counter-clockwise from horizontal) and length must be found in
columns 3 and 4, and size, if not specified on the command-line, should be present in column 5.
The size is the length of the vector head. Vector width is set by -W.
from gmt.
Well, it is already spelled out in detailed:
-Ccpt
Give a CPT or specify -Ccolor1,color2[,color3,...] to build a linear continuous CPT from those colors automatically, where z starts at 0 and is incremented by one for each color. In this case colorn can be a r/g/b triplet, a color name, or an HTML hexadecimal color (e.g. #aabbcc ). If -S is set, let symbol fill color be determined by the z-value in the third column. Additional fields are shifted over by one column (optional size would be 4th rather than 3rd field, etc.). If -S is not set, then plot expects the user to supply a multisegment file where each segment header contains a -Zval string. The val will control the color of the line or polygon (if -L is set) via the CPT.
from gmt.
So the manual clearly needs to provide that information because now it only says (no mention to shuffling the z column around)
-Sv vector. Direction (in degrees counter-clockwise from horizontal) and length must be found in columns 3 and 4, and size, if not specified on the command-line, should be present in column 5. The size is the length of the vector head. Vector width is set by -W.
For the Length that is after Direction, I think it's the length of the stem, right ?
from gmt.
Well, it is already spelled out in detailed:
-Ccpt
Give a CPT or specify -Ccolor1,color2[,color3,...] to build a linear continuous CPT from those colors automatically, where z starts at 0 and is incremented by one for each color. In this case colorn can be a r/g/b triplet, a color name, or an HTML hexadecimal color (e.g. #aabbcc ). If -S is set, let symbol fill color be determined by the z-value in the third column. Additional fields are shifted over by one column (optional size would be 4th rather than 3rd field, etc.). If -S is not set, then plot expects the user to supply a multisegment file where each segment header contains a -Zval string. The val will control the color of the line or polygon (if -L is set) via the CPT.
So my question now is, when -S is set, how can we let both the stem and head of the vector be coloured via the z-value in the third column ?
from gmt.
echo "0 red 10 blue" > t.cpt
echo 0 0 5 0 1i | gmt psxy -R-1/1/-1/1 -JX4i -P -Sv0.2i+e -Ct.cpt -W2p+c > t.ps
seems to work find (gives you a purple vector stem and head.
from gmt.
echo "0 red 10 blue" > t.cpt
echo 0 0 5 0 1i | gmt psxy -R-1/1/-1/1 -JX4i -P -Sv0.2i+e -Ct.cpt -W2p+c > t.psseems to work find (gives you a purple vector stem and head.
Thank you for the comment, Paul. I tested your suggestion with GMT version 5.4.3, but still got the error
psxy: Syntax error: Conflicting -E and -W options regarding -C option application
Any idea of this ?
from gmt.
I cannot fix bugs in 5.4.3 but they are fixed in 6.
from gmt.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.
from gmt.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions.
from gmt.
Related Issues (20)
- Link Checker Report on 2024-03-24
- Rotations with grdview clips images depending on projection and -Q variant
- Oblique projection (Ob): Partly wrong annotations
- Link Checker Report on 2024-03-31 HOT 2
- Link Checker Report on 2024-04-07
- Move all long2short (l2s) tests into a separate test directory? HOT 8
- Cache data are stored in the wrong directory if GMT_DATA_SERVER is set via environmental variable or via "gmt set" HOT 6
- Several grdimage issues when producing GeoTIFFs HOT 1
- Link Checker Report on 2024-04-14
- Link Checker Report on 2024-04-21
- Upgrade animation 1 HOT 3
- Bug. Data get filter twice with psevents -q0:inc:
- New failures on Windows CI HOT 2
- Link Checker Report on 2024-04-28 HOT 2
- Tutorials for Bash and Julia: Missing links to sessions HOT 3
- New ScientificColourMaps version 8.0.1 found HOT 12
- My last commit HOT 3
- New ScientificColourMaps version 8.0.1 found
- Link Checker Report on 2024-05-05 HOT 1
- Surface does not accept Cartesian values for spacing HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gmt.