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