![]() ![]() Now if your criteria is a date, there seems to be a way? but I didn't understand as to explain it here. Thus the filter expression is: (Remember to respect upper/lowercase in both "targets") Then "USD" is the target string and Currency is the targetcolumn. ![]() ![]() Just use the following formula (copy/paste into the "filter expression" box): įor example imagine you need to generate a dataset that contains only those rows where the column "Currency" is "USD". If the column to be used as criteria is a text, then it becomes a bit cumbersome, but not really difficult. You can use several conditions using and and or. For example if you want to create a database which includes only rows where the values of the column COL1 are higher than 23, then the expression is COL1 > 23. Just select the data you want to filter, and use the expression as in math. If the criteria is a number, it is quite straightforward. So, can we filter data which meets a particular criteria? The current answer seems to be: It depends on the type of data (of the criteria). When using the GUI, dates and text do not work as "simple" as with numbers. One would think that there should be a direct correspondence with the implementation of the GUI, but this is obviously not the case. However it is presented under the "Commands and API" section. In the current manual it says (page 29) that the "FilterDatasets" command "works on 1D numeric, date or text datasets.". If there is a bit more documentation or advice somewhere, I would very much appreciate it. It looks like Veusz can do exactly what I need, but pretty clearly there's something I don't get. However, all I got were syntax error messages. ![]() I tried using both examples 1 and 2, following the links, which seemed very clear and easy to understand. This creates two new datasets which you can than plot or process otherwise: Creating two new datasets: A_filtered and B_filtered B>1 and choose the correct datasets to filter. The other way is to create a filter, using Data > Filter - you can give an expression, i.e. Of course I have to do the same for x, otherwise the correlation is false: Using boolean expression as graph input What I did was ydata=B to filter against values greater than 1. I have two datasets with A=1:10:0.1 and B=sin(A)+1. If you only want to filter for plotting you can do exactly what you were describing: using a boolean expression as filter when defining x and y data. "Reddit gave me a hard time posting images. Reddit post by Kaugummiheld in answer to a post "Veusz approach/alternative to boolean indexing?" Well, I sort of found my answer, but it doesn't seem to work: To put it another way, I commonly don't know exactly what I need to plot beforehand. It often takes a lot of comparison of different things in different ways before I can figure out what that data are showing. I should mention that the reason that I would like to filter data sets like this is that I work with rock and water geochemical data, which is very messy. I've read through on-line help and manual documents, and a lot of these Reddits, which have a lot of great material, but not quite what I'm looking for. Maybe there's a way to do the same thing in the data set editor. I've noticed there are ways to show different colors for data points, so there might be a way to make points invisible if they don't match the criteria. I've tried the Filter Data tool (funnel-shaped icon), but I'm not sure if that's the right tool, and in any case I haven't been able to figure out the expression syntax. In Veusz, as I understand it, I would add three XY widgets, but I haven't figured out how to plot only one type for each widget. In Coplot, a subset of each data set can be made using Plot-If-True Boolean expressions, like this: col(1)=1, which is read: If column 1 (Type) equals 1, plot the data point. What I would like to do is plot the 3 samples of each different Type using different colors and symbols, such as Type 1 as black squares, Type 2 as red circles, and Type 3 as blue triangles. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |