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?
Labeling Points
Moderator: DPlotAdmin
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
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.
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.
No, that's a different animal than labels created with TextPointLabel.Can I get more control of the labels in case #1?
Visualize Your Data
support@dplot.com
support@dplot.com
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
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
support@dplot.com