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

Dave glasspusher at outofoptions.net
Fri Jan 10 11:53:36 CST 2020


Hi,
I finally got around to trying this, and I suppose I see the bug. I’m using 7.0.14. The text gets drawn to the left of the legend symbols, and the only way to get them to draw in the correct position is go in and click on each legend in the plots pane of the graph settings dialog. It also renders the text in a bigger size than the original legend.

I did it with a python script:

for r in range(6):
    pf.SetPlotProperties(plot = r + 1, name =  pf.GetData(r+1,1))  



> On Oct 10, 2019, at 7:41 PM, pro Fit support <profit at quansoft.com> wrote:
> 
> 
>> On Oct 9, 2019, at 8:27 PM, Dave <glasspusher at outofoptions.net <mailto: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 <mailto: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 <mailto:profit at quansoft.com>
> 
> 
> 
> 
> 
> _______________________________________________
> proFit-list mailing list
> proFit-list at quantum-soft.com
> http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://quantum-soft.com/pipermail/profit-list_quantum-soft.com/attachments/20200110/6f07fe5e/attachment.html>


More information about the proFit-list mailing list