[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-task-tracker] [task #14243] Rewrite legend.m

From: Pantxo Diribarne
Subject: [Octave-task-tracker] [task #14243] Rewrite legend.m
Date: Mon, 11 Nov 2019 13:03:11 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0

Follow-up Comment #12, task #14243 (project octave):

@Rik: Thanks for the review. I attached an updated version that fixes item 3
through 6, still WIP. 

For item 2, I agree that a single marker in the middle is nicer but this also
means 2 graphics objects, one for the line, one for the marker. I'll update
the code along this idea unless someone has a better one.

As for performance (item 1), the new patch improves the situation   (still
slower than before) but the trade off is that after a legend has been created,
its layout (the way text and item are arranged in an array) won't be updated
when the axes or the figure size changes. This is not dramatic but it makes
the auto-arrange feature (Octave specific) only work when creating the

## A plot with many lines
plot (rand (30));
## Create a legend that nicely fits within the axes
legend ()

I'll try to look for places where performance can be improved, but note that
the new function is already faster that the previous one in many situations
(except in subplots where the position is updated very often).

(file #47838)

Additional Item Attachment:

File name: task14243_legend_2.patch       Size:152 KB


Reply to this item at:


  Message posté via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]