Dplot Jr difference between versions

Q&A for C, C++, and/or C# developers using DPlot
Post Reply
garumble
Posts: 8
Joined: Thu Jun 11, 2009 6:31 pm

Dplot Jr difference between versions

Post by garumble »

Something has happened to Dplot Jr between the two versions I have installed. I'm using the same C# code to send data to the application and on version 2.2.6.7 I get a legend and thin lines in the colors I specified. In version 2.3.0.3 I get thick lines in some default color and no legend.

Can you help?
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Probably, if you'll send me your source. Off the top of my head my best guess is you have a default settings file (%APPDATA%\DPlot\Preferences\default.set) that is changing things. But I've been wrong more than once.

For what it's worth and as far as I can tell, the demo programs distributed with DPlot Jr behave the same way across the last dozen or so versions. But that doesn't mean I didn't foul something up.
Visualize Your Data
support@dplot.com
garumble
Posts: 8
Joined: Thu Jun 11, 2009 6:31 pm

Post by garumble »

There is no default.set file that I can find. I looked in both All Users and my named directory.

How do I send you the source files?
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Attach to an e-mail to support@dplot.com
Visualize Your Data
support@dplot.com
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Thanks for the files. Since you aren't setting the line widths anywhere, DPlot Jr is using the default values it reads from %appdata%\dplot\dplotjr.ini. You can set the line widths with a LineWidth command.

Other than that, I don't see any problem with your source. I suspect something is going wrong here:

Code: Select all

cmds += String.Format("[Legend({0},\"{1}\")]", i + 1, data.y[i].title);
but since you're using DPlot_SetErrorMethod(2), I'd also think that if there were a problem, you'd get a MessageBox telling you that.

I did notice that you're calling DPlot_Plot8 twice, the second time with a blank command string. Are you sure you don't have 2 plots and that the first one (obscured by the second) doesn't have the appearance you expect?

Unfortunately I don't know beans about SQL and of course don't have your data, so it isn't possible to compile and run your code. If you'll send me the compiled executable plus whatever DB files are needed I'll add a few traps to figure out why you aren't getting a legend.
Visualize Your Data
support@dplot.com
garumble
Posts: 8
Joined: Thu Jun 11, 2009 6:31 pm

Post by garumble »

Yes, there are two graphs one with the legend, and one without. When I minimized the one in front I see the other.

The previous version only generates one graph.

No idea why, but the lines are getting set to the correct colors now.

I'll add the line width setting to the code and remove one of the plot calls.

Thanks.
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

The previous version only generates one graph.
If so then that's a bug in previous versions. You're clearly calling DPlot_Plot8 twice, which will generate two separate plots. If you recheck and find that only one plot is generated with an older (or current) version of DPlot Jr, please let me know.
No idea why, but the lines are getting set to the correct colors now.
In the first plot, that's because the command string containing the [Color(...)] command is being sent. It isn't in the second plot (cmds = ""; )

Sounds like this is all worked out. If you run into any other problems please let me know.
Visualize Your Data
support@dplot.com
Post Reply