Hi Steven,
It works perfectly, I just grouped the y^+ term  to avoid a double
superscript error

"\$f^+="*a1*"{y^+}^{"*a2*"}\$"

Thanks,

2016-08-12 12:27 GMT-04:00 Steven G. Johnson <[email protected]>:
>
>
> On Thursday, August 11, 2016 at 4:57:25 PM UTC-4, Juan Carlos Cuevas
> Bautista wrote:
>>
>> Hi All,
>>
>> I am using Pyplot in Julia to plot some fits in my data. I would like to
>> have a legend with my fit, however I am having problems to use the
>> coefficients of my fit like superscripts in the legend. I have something
>> like this
>>
>> #---compute the coefficients of my fit
>> a,fmin=multifits(xvector,yvector,"power");
>>
>> #--a is column vector with the coefficients of my power fit.
>> #--Make a string for the legend using the elements of a
>> a1=@sprintf("%0.2f",a[1]);                                 #---string
>> element 1 formatted
>> a2=@sprintf("%0.2f",a[2]);                                 #---string
>> element 2 formated
>>
>> legendstr=L"$f^+=$"*a1*L"$y^+^{$"*a2*L"$}$";
>>
>
> It seems like you want: "\$f^+="*a1*"y^+^{"*a2*"}\$" ?

Reply via email to