DPlot Legend for curve not shown
Moderator: DPlotAdmin
-
- Posts: 11
- Joined: Tue Mar 15, 2005 12:18 pm
DPlot Legend for curve not shown
Hi,
when adding several legends for curves to DPlot it happens that only the first legend is shown, all the others are not visible. As soon as I move the legend or open something in the toolbar the rest also becomes visible. Is there a way to avoid this behavior?
Regards
________
Yamaha CS1x specifications
when adding several legends for curves to DPlot it happens that only the first legend is shown, all the others are not visible. As soon as I move the legend or open something in the toolbar the rest also becomes visible. Is there a way to avoid this behavior?
Regards
________
Yamaha CS1x specifications
Last edited by Fastbeats4u on Mon Jan 31, 2011 7:30 pm, edited 1 time in total.
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
How exactly are you adding those legend entries? And what version of DPlot are you using?
Visualize Your Data
support@dplot.com
support@dplot.com
-
- Posts: 11
- Joined: Tue Mar 15, 2005 12:18 pm
I'm using DPlotJr 2.0.0.1 and DPlotLib.dll 1.9.9.6.
After creating a new document some initial settings for the Legend:
[LegendParams(0.3,10,0,0,.01,.01)]
and for each line displayed:
________
BMW R1150RT
After creating a new document some initial settings for the Legend:
[LegendParams(0.3,10,0,0,.01,.01)]
and for each line displayed:
Code: Select all
sprintf(szExec,"[Legend(%i,\"%s\")]",lineNo, lineLabel);
dPlot_Command(m_iDocNum,szExec);
BMW R1150RT
Last edited by Fastbeats4u on Mon Jan 31, 2011 7:30 pm, edited 1 time in total.
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
Thanks for the info. I'll have to play around with this some to see if I can recreate it. Check to make sure you aren't using a [PostponeRedraw()] command in there somewhere. If you are, then finish up with a [ViewRedraw()].
Visualize Your Data
support@dplot.com
support@dplot.com
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
I tried a test just now and am not getting the results you do. My best guess is what I mentioned above - that you're using a [PostponeRedraw()] somewhere, not followed by a [ViewRedraw()]. In any case, if you send a [ViewRedraw()] as the last command that should take care of the problem. Please let me know how this works out.
Visualize Your Data
support@dplot.com
support@dplot.com
-
- Posts: 11
- Joined: Tue Mar 15, 2005 12:18 pm
This behavior is quite strange, I know.
I don't use [PostponeRedraw()] and I also made several attempts to get rid of this problem, including use of [ViewRedraw()] etc.
A friend of mine, told me about this problem and it took me a while to reproduce this behavior, as it didn't appear on my computer in the beginning. Right now I'm trying to track which action triggers this problem. I think - but I'm not sure, as I didn't finish my investigations - this problem is caused by the YCutoff command.
I'll keep you informed about the results of my investigation.
________
EX250J
I don't use [PostponeRedraw()] and I also made several attempts to get rid of this problem, including use of [ViewRedraw()] etc.
A friend of mine, told me about this problem and it took me a while to reproduce this behavior, as it didn't appear on my computer in the beginning. Right now I'm trying to track which action triggers this problem. I think - but I'm not sure, as I didn't finish my investigations - this problem is caused by the YCutoff command.
I'll keep you informed about the results of my investigation.
________
EX250J
Last edited by Fastbeats4u on Mon Jan 31, 2011 7:30 pm, edited 1 time in total.
-
- Posts: 11
- Joined: Tue Mar 15, 2005 12:18 pm
Unfortunately I still didn't find a reason for this strange behavior
Even worse because I was not able to reproduce it in the beginning and now I don't get rid of it.
Well what I found out:
1. Only the first Legend of a curve is shown
2. Legends of reference lines are not affected
3. When opening a menu in the menu bar which "touches" some parts of the legend, these parts become visible (Hard to explain, I hope it's understandable). It seems like the parts are hidden under the Plot.
4. The whole legend becomes visible when I have to do a manual scale (Y values) or when the X axis (time) is moving.
________
Chrysler PL platform specifications

Even worse because I was not able to reproduce it in the beginning and now I don't get rid of it.
Well what I found out:
1. Only the first Legend of a curve is shown
2. Legends of reference lines are not affected
3. When opening a menu in the menu bar which "touches" some parts of the legend, these parts become visible (Hard to explain, I hope it's understandable). It seems like the parts are hidden under the Plot.
4. The whole legend becomes visible when I have to do a manual scale (Y values) or when the X axis (time) is moving.
________
Chrysler PL platform specifications
Last edited by Fastbeats4u on Mon Jan 31, 2011 7:30 pm, edited 1 time in total.
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
4. The whole legend becomes visible when I have to do a manual scale (Y values) or when the X axis (time) is moving.
Ah! Now it makes sense... I think. I'm guessing that you're sending data to DPlot via an [XY()] or [XYXY()] command or by calling DPlot_AddData, right? If so, there's an optimization taking place when you also use ManualScale. As you add data, the only things that get drawn are the new line segments. The entire plot will not be redrawn until the X limits are exceeded or you send a second (or third or fourth) ManualScale command to adjust the limits. If you set your legend entries before using ManualScale the first time, everything should work (but please let me know if it doesn't).
Visualize Your Data
support@dplot.com
support@dplot.com
-
- Posts: 11
- Joined: Tue Mar 15, 2005 12:18 pm
You are right I'm sending in Data using [XYXY()] to display something near realtime. Sorry for not mentioning this earlier...
Well, I have to check the code tomorrow, but as far as I can remember I'm using the ManualScale() a long way after doing this initial legend stuff. This problem also appeared with version 2.0.0.1, I didn't experience anything like that with former versions.
I'll check tomorrow, in order to be sure. Thanks a lot for your great support.
________
Jaguar Mark 2 specifications
Well, I have to check the code tomorrow, but as far as I can remember I'm using the ManualScale() a long way after doing this initial legend stuff. This problem also appeared with version 2.0.0.1, I didn't experience anything like that with former versions.
I'll check tomorrow, in order to be sure. Thanks a lot for your great support.
________
Jaguar Mark 2 specifications
Last edited by Fastbeats4u on Mon Jan 31, 2011 7:30 pm, edited 1 time in total.
-
- Posts: 11
- Joined: Tue Mar 15, 2005 12:18 pm
FYI
I rechecked my code and I'm not using ManualScale() before all legend entries are set.
________
Honda Civic (third generation) history
I rechecked my code and I'm not using ManualScale() before all legend entries are set.
________
Honda Civic (third generation) history
Last edited by Fastbeats4u on Mon Jan 31, 2011 7:31 pm, edited 1 time in total.
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
I'm stumped. Is there any chance you can send me your source code?
Visualize Your Data
support@dplot.com
support@dplot.com