DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Creating a file import plugin, need to set number format

 
Post new topic   Reply to topic    DPlot Forum Index -> C, C++, C#
View previous topic :: View next topic  
Author Message
Gogeta70



Joined: 05 Mar 2013
Posts: 7

PostPosted: Tue Mar 05, 2013 12:15 pm    Post subject: Creating a file import plugin, need to set number format Reply with quote

Hi, i'm creating a DPlot plugin to import a custom file format that is generated by another program i wrote. This program takes data from electrical meters that monitor amps and voltage over a period of time.

Basically, i need to generate a line graph that uses the Y axis as the voltage and amp values, and the X axis represents a period of time. I've read over the help file in DPlot regarding developing plugins as well as the plugin examples and the DPlot.h header file, however i haven't found anything that suggests i can set the number format for the X axis.

I did see that in the DPlot help file, it shows an lpszCommands string for the DPLOT structure, but i could not find that in the DPlot.h header file (which supports up to version 4).

Am i missing something here? DPlot is a great solution for what i need, but i have to be able to represent dates and times along the X axis.
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Tue Mar 05, 2013 4:13 pm    Post subject: Reply with quote

Search the DPlot Help file for plugins then scroll near the bottom for the DPLOT structure.

This is different than the structure used by calls to DPLOTLIB.DLL, which I think may have caused some confusion... except that I just noticed I included the wrong DPLOT.H with the plugin examples, so it's no wonder you were confused! I'll fix this soon. In the meantime just copy the DPLOT structure from the Help file and you should be good to go.

The lpszCommands string should contain commands in the same syntax you'd use when calling DPlot_Command in another application. For example to set the number format on the X axis to date & time you'd use

"[NumberFormat(0,13)]"

You can string as many commands together as you want, up to 32K.

Let me know if you have any questions.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Tue Mar 05, 2013 4:20 pm    Post subject: Reply with quote

I just replaced http://www.dplot.com/plugins.zip to include the correct header file. Sorry for the trouble.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Gogeta70



Joined: 05 Mar 2013
Posts: 7

PostPosted: Tue Mar 05, 2013 5:09 pm    Post subject: Reply with quote

Perfect! Thank you.

One more question, just so i'm sure.

Say i write a plugin to import a file that has say, 3 curves. For the second curve, do write to X and Y[DPlot->MaxPoints], and for the third curve X and Y[DPlot-MaxPoints * 2]?
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Tue Mar 05, 2013 5:27 pm    Post subject: Reply with quote

Yes, that's correct.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Gogeta70



Joined: 05 Mar 2013
Posts: 7

PostPosted: Tue Mar 05, 2013 5:41 pm    Post subject: Reply with quote

Thanks for all the help! I'm finally getting somewhere with all this now. Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> C, C++, C# All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group