Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#402 closed task (fixed)

Line legends/titles needs to be restored

Reported by: Jari Häkkinen Owned by: Jari Häkkinen
Priority: major Milestone: svndigest 0.8
Component: output Version: trunk
Keywords: Cc:

Change History (12)

comment:1 Changed 14 years ago by Jari Häkkinen

(In [878]) Addresses #402. Legends in place. Not the same order as wih gnuplot.

comment:2 Changed 14 years ago by Jari Häkkinen

(In [881]) Addresses #402. Improved alligment of legend line and text.

comment:3 Changed 14 years ago by Jari Häkkinen

Description: modified (diff)

Before proceeding further with this ticket we should fix ticket:75 since its resolution may affect the final look of the legend.

comment:4 Changed 14 years ago by Jari Häkkinen

Status: newassigned

I think we should sort the legend w.r.t. the number of lines in the latest revision.

If we allow it to be sorted in ascending order (i.e., lowest number at the top) then the total line will be automatically drawn over the other lines.

I think we should sort the legend in decreasing order but plot the graphs in ascending order. This will automatically put the highest curve on top of the others (in foreground, plplot overwrites the figure when new information is drawn). This is more complicated to accomplish than the suggestion in the previous paragraph.

Should we also justify the legend text? I assume that this is highly non-trivial with the current legend

----- 12323 Total
----- 2332 Jari
----- 9991 Peter

If we change the legend to

12323 ----- Total
 2332 ----- Jari
 9991 ----- Peter

It is more or less straightforward to implement. Comments please.

comment:5 in reply to:  4 ; Changed 14 years ago by Peter Johansson

Replying to jari:

I think we should sort the legend w.r.t. the number of lines in the latest revision.

If we allow it to be sorted in ascending order (i.e., lowest number at the top) then the total line will be automatically drawn over the other lines.

I think we should sort the legend in decreasing order but plot the graphs in ascending order. This will automatically put the highest curve on top of the others (in foreground, plplot overwrites the figure when new information is drawn). This is more complicated to accomplish than the suggestion in the previous paragraph.

These are two questions as I see it. I understand they are connected, but I'll answer them separately.

1) For the curves I think the total should be plotted last so it aways the first seat foreground and never overdrawn by an individual author. For remaining order of the plots I have no strong opinions. I wouldn't mind what you suggest, but any order would.

2) For the legend I see two variants. Either we keep it as is, i.e., an author with higher line count appear higher in the legend (and consequently total is the very top one). I remember this was much more eye friendly than other orders when we experimented with this (at the beginning of time). An alternative would be to do this more tightly with ticket:75 and have the same sort in all plots. If I have to pick one, I would go for the first alternative.

Should we also justify the legend text? I assume that this is highly non-trivial with the current legend

----- 12323 Total
----- 2332 Jari
----- 9991 Peter

If we change the legend to

12323 ----- Total
 2332 ----- Jari
 9991 ----- Peter

It is more or less straightforward to implement. Comments please.

Why is the latter one so much easier to implement?

If we can align the text as nice as you did in your display, I wouldn't mind the latter approach.

comment:6 in reply to:  5 Changed 14 years ago by Peter Johansson

Replying to peter:

Replying to jari:

It is more or less straightforward to implement. Comments please.

Why is the latter one so much easier to implement?

If we can align the text as nice as you did in your display, I wouldn't mind the latter approach.

After checking the 0.7 output, I must say I would prefer straighforward way. I don't like the alignment in 0.7.

comment:7 in reply to:  5 ; Changed 14 years ago by Jari Häkkinen

Replying to peter:

Why is the latter one so much easier to implement?

The reason is that we have control over the line coordinates. This allows us to left justify the text right of the line and right justify the text to left of the line. Justification functionality is already in plplot.

If we put all text to the right of the line and require that we right justify the numbers we are required to calculate indentation levels and more to take car of different magnitudes. Basically we'd want to justify on the space between the number and label. Using a fixed size font would make things easier but we would still need to test how to compensate for the different sizes of number.

And we might want to change fonts someday.

comment:8 Changed 14 years ago by Jari Häkkinen

So, I'll implement sorting and the second legend example. The plots will be plotted in line number ascending order. This will make the total to be plotted on top.

comment:9 in reply to:  7 Changed 14 years ago by Peter Johansson

Replying to jari:

If we put all text to the right of the line and require that we right justify the numbers we are required to calculate indentation levels and more to take car of different magnitudes. Basically we'd want to justify on the space between the number and label.

This is of academic interest now, but what you described above - and how it looks in 0.7 - is that the numbers are not right justified. Rather the entire string: "3223 jari" is left justified and treated as one string. I understand that treating number and name as two columns makes things very complicated.

comment:10 Changed 14 years ago by Jari Häkkinen

(In [883]) Addresses #402. Legend is right justified on numbers and left justified on label. The text should also move appropriately with number size.

comment:11 Changed 14 years ago by Jari Häkkinen

Resolution: fixed
Status: assignedclosed

(In [885]) Fixes #402. The legend is written in reverse order compared to the plot order, i.e., if total is plotted last it will be 1st in legend and over the other graphs.

comment:12 Changed 14 years ago by Jari Häkkinen

Description: modified (diff)
Note: See TracTickets for help on using tickets.