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 

DPlot Jr Questions and Comments

 
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions
View previous topic :: View next topic  
Author Message
DPlotAdmin
Site Admin


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

PostPosted: Tue Aug 26, 2003 11:03 pm    Post subject: DPlot Jr Questions and Comments Reply with quote

The following is an e-mail exchange from earlier today; I thought some of this might be informative for others.

Possible Bugs/Oversights:
1. It is possible to draw data labels turned 90 deg using the interface. Are you planning a comparable macro command or is it just not documented right now?


Nope, not currently possible. Nice catch. In the next version you'll set "options" in the TextPointLabel command to 16 + whatever other option flags are in effect.

2. I like your methods for changing curve characterisitics in "batch mode" so that changes operate on all curves instead of just the selected one. The documentation tells how to do this programmatically with LineType, LineWidth, and SymbolType but not with SymbolSize. I'm *assuming* I could put in the special curve flag of -1 and it would also work even though it doesn't say this in the documentation.

Unfortunately that would only result in an error at present. Will add to the next release.

3. The symbol types macro documentation in dplotjr help is out of date. I'm assuming all 38 symbol styles as documented in dplot help are available via the SymbolType macro in dplotjr as well.

Yes, they are, and yes it is. Thank you for pointing out the omission.

4. I can't seem to find the "Options>Log scale tick labels" command in dplotjr. I was able to find it with dplot but that was a few weeks ago, and I may be screwing things up now. I had linx/logy and logx/logy plots visible, and I couldn't ever find the command. Also, are corresponding macro commands going to be available?

Bah. The menu command is missing in DPlot Jr, and the description of the corresponding DDE command isn't included in DPlot Jr's Help file. (The command is [LogTicks(0,1, or 2)] and it does work with DPlot Jr).

Questions:
1. I see that you can "GetBitmaps" and "GetEnhMetafiles" from dplot to subsequently "paint" into another form window. I've got the bitmap technique implemented right now. In your opinion, what are the advantages of also providing the ability to "paint" metafiles to form windows? I understand the difference when saving to files to be opened, but I don't directly see the tradeoffs of getting+painting a bitmap on a form versus a metafile.


It really depends on what you want to do with the plot in your application. If you want the user to be able to copy it to the clipboard or print it, then a metafile is, hands-down, superior. For example try printing one of the plots in the ctest4 or btest4 demos. To get the same printed quality with a bitmap, you'd need a ridiculously large one.

On the other hand... one nice feature of metafiles also works against them in one particular instance. If you look at the btest2 demo, it uses DPlot_GetBitmapEx to retrieve (along with a bitmap) the coordinates of the plot corners in both data space and bitmap pixel space. This information is used to translate mouse position into X,Y coordinates as you move the mouse across the plot. Nice feature (and a user request, by the way). While the same thing *could* be done if there were a corresponding DPLOTLIB routine for metafiles, implementation would be much more of a problem. PlayEnhMetaFile will scale our metafile to the target rectangle and in general does a nice job of it. But if the metafile is scaled down to fit the target rectangle, the scale factors would be wrong. Knowing the physical dimensions of the target rectangle you could still perform the translation, but you have no real hope of not introducing roundoff errors. My suggestion if you want to provide this feature AND print/copy good quality plots is to use BOTH DPlot_GetBitmapEx and DPlot_GetEnhMetaFile; use the bitmap for display output and the metafile for everything else. And now that I've written this down... this should go in the DPLOTLIB documentation.

Poster subsequently provided code for obtaining the physical dimensions of a control in VB, which was appreciated. I'm still of the opinion that this operation will be problematic with roundoff errors, but I'll try a few examples to see what happens.

2. I haven't tried this yet, but is it possible to plot an "invisible" curve (i.e. one with no symbols and no line). The purpose of doing something like this would be to "plot" custom text labels at particular locations on an XY grid.

Sure. If you're using one of the DPlot_Plot* functions, set the LineType and SymbolType for your invisible curve to 0. Or use [LineType(curve,0)], [SymbolType(curve,0)]

Suggestions:
1. Right now the symbol frequency command controls all curves on a plot together. Is it possible to control this on a per-curve basis?


No. I'll add this in a later version.

2. I keep getting this request over and over and over..... the ability to plot xy data using more than 2 y axes. In otherwords, the option to have 3 (or 4 or 5...) independent y axes on an xy plot. Options would be available to have the 3rd and subsequent axes to be located a) parallel and offset from the primary or secondary y axis or b) "stacked" such that the complete vertical axis is "broken" into two or more axes (kind of like a stacked plot scenario using a common x axis, but this would all be on the same grid).

All of the above is coming... sometime. This is a frequent request and I AM listening, but it's the sort of thing that can open the door to a lot of errors, and I want to get it right rather than rushing into it.

- In the dplotlib documentation you have this in the DPlot_GetBitmapEx documentation when discussing how to translate a "picture" location referenced from the top/left corner into plotting coordinates - specifically for polar coordinates:

<snipped>

Comments on this...a) it is only good for translating into polar coordinates with degree angular measurements, and b) you don't get the correct angular coordinate in the II and III quadrants (theta > 0 and < 270).


Oops. Here's the correct code:

Code:

PI = 4# * atn(1#)
xp = (x - (DPM.hll + DPM.hur) / 2#) * 2# * (DPM.yhi - DPM.ylo) / (DPM.hur - DPM.hll) + DPM.ylo
yp = (y - (DPM.vll + DPM.vur) / 2#) * 2# * (DPM.yhi - DPM.ylo) / (DPM.vur - DPM.vll) + DPM.ylo
If xp = 0 Then
   If yp < 0 Then
      alpha = -90
   Else
      alpha = 90
   End If
ElseIf xp < 0 Then
   alpha = Atn(yp / xp) * 180# / PI - 180
Else
   alpha = Atn(yp / xp) * 180# / PI
End If
If alpha < 0# Then
   alpha = 360 + alpha
End If
radius = Sqr(xp ^ 2 + yp ^ 2)
alpha_r = alpha * PI/180   ' alpha in radians


Next round of DPLOTLIB demo programs will include logarithmic and polar scale XY plots with all of the appropriate code in place to back out X,Y coordinates from mouse position.
_________________
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 -> Suggestions/Questions 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