View previous topic :: View next topic |
Author |
Message |
markt
Joined: 28 Jul 2004 Posts: 2 Location: Orlando, FL
|
Posted: Wed Jul 28, 2004 6:39 am Post subject: Labeling Points |
|
|
I am using DPLOTLIB.DLL to generate my plots in VB6. I am trying to label the curves and have run into two different problems with my LOG-LOG plots.
1) Using the D.Label method, I get labels that I cannot control the size, location, or rotation of. As a result, they are overlapping and unreadable.
2) I switched to using TextPointLabel similar to this to label the last (top) point of my curves:
"[SelectCurve(" & CStr(j) & ")]"
"[TextPointLabel(" & CStr(lNumberPoints(j)) & ",-100,-300,0,0,8," & Chr$(34) & sLabel(j) & Chr$(34) & ")]"
I have to build the strings in a loop to handle multiple curves. The problem is the LOG-LOG graph does not handle the XY offset well at all - I get labels on the curves to the right, but the curves to the left are off the plot. It appears that I may need to generate custom absolute points, but I would like to try to avoid that.
My problem: With #1, I get labels that are mostly perfect, but I have no control over for size, location, or rotation. With #2, I cannot get consistent locations because of the LOG-LOG plot. Also with #2, I must have the label within the plot when I really want it outside next to the last data point.
Can I get more control of the labels in case #1? |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Wed Jul 28, 2004 9:28 am Post subject: |
|
|
I'll add an options flag for TextPointLabel that says X and Y are physical offsets in... say... hundredths of inches rather than plot-space values. This won't cure wanting to place labels off the plot, though. I'll have to give that one some more thought.
For log-log scales you can get a consistent offset for all labels with the current version with
X=exp(log(Xpt)+log(Xoff))
Y=exp(log(Ypt)+log(Yoff))
where Xpt, Ypt are the coordinates of the labelled point, Xoff, Yoff are absolute values of the offsets. Use - log(Xoff) if you want the label to the left of the point.
Quote: | Can I get more control of the labels in case #1? |
No, that's a different animal than labels created with TextPointLabel. _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
markt
Joined: 28 Jul 2004 Posts: 2 Location: Orlando, FL
|
Posted: Wed Jul 28, 2004 11:13 am Post subject: |
|
|
OK. I assume that D.Label was a quick thing that was never intended to allow options. If you allow escaped control characters in the label to control the rotation though....
D.Label = "^LMylabel" ' Rotate label 90 degrees CCW
D.Label = "^RMylabel" ' Rotate label 90 degrees CW
Just a thought. |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Wed Jul 28, 2004 12:07 pm Post subject: |
|
|
Nice idea, with the benefit that it won't break existing plots. I'll add something along these lines for sure. Thanks for the suggestion. _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
|
|
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
|