function x=plotemeasure(h,m)

%this plots the energy measure of a harmonic function h of level m.

q0=[1/2 1]; q1=[0 0]; q2=[1 0];
v=[1/2 1/2];
for i=1:1:m
    v=[wordm(v,q0); wordm(v,q1); wordm(v,q2)];
end

M=wordmatrix(m);
x=[];
for j=1:1:3^m
    x=[x ; emeasure(h,M(j,:))];
end


hold off
plot3c(v(:,1),v(:,2),log(x))
hold on
y=SG(m);

%{
for n=1:1:3^(m)
    hold on
    
    plot3([y(3*n-2:3*n,1); y(3*n-2,1)],[y(3*n-2:3*n,2) ;y(3*n-2,2)], [0 0 0 0], 'y')
end
%}
