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"$}$";

Everything works well except for the superscript part, I have an error 

ERROR: LoadError: MethodError: `rem` has no method matching 
rem(::LaTeXStrings.LaTeXString, ::Float64),

obviously because I am breaking the parenthesis in the superscript, then I 
supposed that I can not build the legend in this way. I have tried 
different approaches like this

legstr=L"$f^+=$"*a1*L"$y^+^{%.2f}$" % (a[2])
http://research.endlessfernweh.com/2012/12/


which is used in python but it still doesn't work. I want something like 
the second equation in the legend for the attachment. If somebody can help 
or suggest me an alternative method, I would appreciate very much.

Thanks,


Reply via email to