[proFit-list] script to add stuff to a legend

pro Fit support profit at quansoft.com
Thu Oct 10 21:41:21 CDT 2019


> On Oct 9, 2019, at 8:27 PM, Dave <glasspusher at outofoptions.net> wrote:
> 
> Hi all,
> 
> I’m looking to modify a set of labels to curves in a legend. Rather than edit the text for each curve in the legend individually, is there a way script it to say insert or replace text in each curve legend with a set of comma or space delimited text to go to each entry?
> 
> Thanks for any and all
> 
> Dave Sopchak
> _______________________________________________
> proFit-list mailing list
> proFit-list at quantum-soft.com
> http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com


Dear Dave,

what you can do is write a script to change the name of each curve in the graph, and this will then change the name in the legend.

Let’s say you put the new name for all curves in your plot in the furst column of the current data window (set it to be of type text) and that you want to transfer those names to the curves in the current graph. Here a simple script that would do just that for the first two curves in the current graph (you can also write the same thing in python if you prefer):

program changenames;
var i:integer;
begin
 for i:=1 to 2 do
 begin
 	SetPlotProperties(plot i, name GetCell(i,1));
 end;
end;

The only issue is that after you have run this script in pro Fit version 7.0.14 or earlier you have to do the additional final step of selecting the legend and changing the font size to force an update. But this is fixed in pro FIt 7.0.15, which we are just about to release.

all the best,
—
pro Fit support
profit at quansoft.com





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://quantum-soft.com/pipermail/profit-list_quantum-soft.com/attachments/20191010/56d9a274/attachment-0001.html>


More information about the proFit-list mailing list