Is there an interface to pass double precision values into dplot through the plugin/dlls? I've written a plugin for my data format, but I require finer time resolution for the x-axis than is possible with the float data type.... It appears that you must be using 'double' in your built-in readers already.
Thanks - RAS
Double Precision Data in Plugin File Reader
Moderator: DPlotAdmin
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
Yes, though now that you mention it I notice that I haven't updated the plugin examples properly. I'll do that late tonight. In the meantime, the short version is:
#define PLUGIN_DOUBLES 32L
In plugin_init, return DataType as the actual data type + PLUGIN_DOUBLES.
In plugin_readfile the only difference is that the last 2 arguments are (double *) rather than (float *).
#define PLUGIN_DOUBLES 32L
In plugin_init, return DataType as the actual data type + PLUGIN_DOUBLES.
In plugin_readfile the only difference is that the last 2 arguments are (double *) rather than (float *).
Visualize Your Data
support@dplot.com
support@dplot.com
Excellent - with the added PLUGIN_DOUBLES flag and changed return types I'm up to the required precision. Thanks.
On a related question, is DATA_XYYY really not a valid plugin data type (as indicated in the example plugin comments)? My (very long) data files effectively consist of a number of synchronously sampled channels, and it seems a shame to have to take up space for the storage of redundant X values. Do you store redundant X values internally when you read a multicolumn ASCII/CSV file?
On a related question, is DATA_XYYY really not a valid plugin data type (as indicated in the example plugin comments)? My (very long) data files effectively consist of a number of synchronously sampled channels, and it seems a shame to have to take up space for the storage of redundant X values. Do you store redundant X values internally when you read a multicolumn ASCII/CSV file?
- RAS
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
You're welcome. Glad it worked out easily.
Yes, DATA_XYYY isn't valid (nor is DATA_DXY). You guessed correctly: all of those redundant X values are stored in DPlot regardless of the data source, so nothing would be gained by using either of those 2 formats. All X values are stored because to do otherwise would become a bookkeeping problem - think appending other files, pasting data, truncating or otherwise operating on only one curve, etc.
Yes, DATA_XYYY isn't valid (nor is DATA_DXY). You guessed correctly: all of those redundant X values are stored in DPlot regardless of the data source, so nothing would be gained by using either of those 2 formats. All X values are stored because to do otherwise would become a bookkeeping problem - think appending other files, pasting data, truncating or otherwise operating on only one curve, etc.
Visualize Your Data
support@dplot.com
support@dplot.com