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 

Problems with DPlot Jr & 3D data/ Help needed

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



Joined: 29 Mar 2007
Posts: 2

PostPosted: Thu Mar 29, 2007 1:33 pm    Post subject: Problems with DPlot Jr & 3D data/ Help needed Reply with quote

Hi

I'm trying to code in C++ and I which to generate a 3D plot of none grid data ie x,y,z values.

I'm using Dev C++ (gcc / Wming complier).

On my installation of DPlot Jr /Dplot reg version. I am having data transfer problems with the C examples.

I get a blank Dplot window generated with all the examples except
CTEST3 and FTEST which do work.

The key difference is CTEST3 uses dplot_Command()
while the other examples use DPlot_Plot(&DPlot,x,y, cmds)

So using the command:..
for loop
ret = dplot_Command(DocNum, "[XY(1,2)]");
next itr
ret = dplot_Command(DocNum, "[XY(2,3)]");
etc..

I can sucessfully plot 2D points.

However when I try
ret = dplot_Command(DocNum, "[XYZ(1, 1,2,3)]");
or
ret = dplot_Command(DocNum, "[XYZ( 1.0,2.0,3.0)]");

I get a pop up box XYZ command : Wrong data type
then
Error processing this command.

Therefore my questions are:
Is there a way I can get the examples working?

What is the correct syntax for operation of the XYZ, XYZEx .. commands?

Thanks

Matt
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


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

PostPosted: Thu Mar 29, 2007 2:30 pm    Post subject: Reply with quote

Matt,
The "Wrong data type" message indicates (though it doesn't do it very well) that you need to set the data type for DocNum to 3D data. The easiest way to do that is when first creating that document, with [FileNew(3)].

I'm curious about why the examples wouldn't work with gcc. The last time I looked they worked just fine. I've no time at the moment but will look into this as soon as possible.

Quote:
What is the correct syntax for operation of the XYZ, XYZEx .. commands?


Your first example is correct for XYZ. Click "Search for Help on" in DPlot and on the Index tab type "XYZ" or "XYZEx".
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
efcommander



Joined: 29 Mar 2007
Posts: 2

PostPosted: Fri Mar 30, 2007 12:30 pm    Post subject: The saga continues Reply with quote

Thanks for the hint dave.

However, I have now run into another problem.

In my C++ routine I'm first generating a 2D plot followed by a 3D plot.

For the 2D plot the following commands are used:
DocNum=dplot_Command(0, "[FileNew()]");
ret=dPlot_Command(DocNum, "[Title1(\"Title\")]");

the data is then entered in a loop construct:
using
sprintf (command,"[XYXY(1,%g,%g)]", *px, *py);
ret=dPlot_Command(DocNum, command);
command couts as [XYXY(1,2,3)]

This plots an updating 2D graph.

Then the routine would call:


DocNum2=dplot_Command(0,"[FileNew(3)]");
(this creates a new plot2
DocNum2 is assigned as 2)

I can then add data
ret=dplot_Command(DocNum2,"[XYZEx(0,1, 2,4,5]");

however if I do somthing like
ret=dplot_Command(DocNum2,"[XYZRegen()]");
or
ret=dplot_Command(DocNum2, "[Title1(\"Title\")]");

Dplot crashes and reopens on the next command with error processing command "[Activate(2)]"

I'm able to plot each graph in isolation, but would been mutliple windows of the 2D and 3D graphs..

N.b. I just tried plotting 2 secessive 3D plots and this works.

Is this a bug with Dplot, or is there a way to plot a 2D graph and 3D graph.

Thanks

Matt
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


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

PostPosted: Fri Mar 30, 2007 1:38 pm    Post subject: Reply with quote

Quote:
Is this a bug with Dplot...


Apparently, though it isn't one I've seen before. I'll look into this as soon as possible, but it will likely be the end of the weekend before I have a fix available.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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