-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unclear bar plot (-Sb
or -SB
) generated by plot
when only appending +v
(no +s
)
#7021
Comments
I mean, the data and use for this type of symbol might be categorical thinks with different values, and it makes absolutely no sense to me to if the values relative to base are not sorted. What am I misunderstanding here? |
Thanks for your response @PaulWessel! There is nothing wrong with sorting the values before plotting them for this type of symbol or bar plot. My example is slightly modified from a planed PyGMT gallery example by @michaelgrund (bottom right panel, using |
I don't think it makes sense to required a sorted data. For this example data, it's impossible to sort the two records at the same time.
|
For +i it is clearly required that the data are in the right order since sorting makes no sense. For +v I fail to see what sort of actual data would come with values in different columns. Maybe I just dont understand the use. Basically, the data given via +i cumulatively sum to give the required comparable input if +v is used. You cannot shuffle columns around. Your example above, is that really an actual data example of just an made-up example to demonstrate the plotting? |
If anything, I think an error message might be the best option. |
This is just an made-up example data. I think for this kind of data, it makes more sense to use |
Yes, but again you probably want split bar number 2 to represent the same data column throughout. |
If I'm guessing right +v plots the bars from last to first, so if values are not sorted some bars will be completely hidden by some other(s). So, yes, data must absolutely be sorted. |
Thanks for all the thoughts on this topic!
Meaning for the data example |
Description of the problem
Please see the explanation to plot vertical and horizontal bars in the GMT documentation of the
plot
module, especially the following part (exemplary for horizontal bars):What is the expected bar plot (-
Sb
or-SB
) for only appending+v
(no+s
), maybe overlaid bars?This question arises since the generated figure shown below remains unclear, especially for the lower bar. In the case of overlaid bars, three differently colored sections seem to make sense for the upper bar, since two of the four values for this bar are identical. The lower bar contains only three differently colored sections, despite four different values are given in the provided txt file. The values are not given in an increasing / a decreasing order.
Opening this issue is related to GenericMappingTools/pygmt#1521 (comment).
Full script that generated the error
Original post at GenericMappingTools/pygmt#1521 (comment).
Related PyGMT example at GenericMappingTools/pygmt#1521 (comment).
Data: data_vhbars.txt
Colormap (please remove the
.txt
): roma_vhbars.cpt.txtCLI minimal example:
Full error message
No error message occurs.
Actual outcome
System information
gmt --version
): 6.4.0The text was updated successfully, but these errors were encountered: