Quantcast
Channel: ThingSpeak IoT Community - All Forums
Viewing all articles
Browse latest Browse all 1833

piajola on Displaying an analysis result

$
0
0

Hi Briscoe,

If this is of any help ... I hope it is near your last question

1- Apps / MATLAB Visualizations + Green button "New"  (create a new visualization) (no analysis no plugin)

2- Custom (no starter code) + Green button "Create" (near page bottom) (so you get a blank box without templates/examples)

3- MATLAB Code box (copy/paste the blue code below)  +  Green button "Save and Run" 
   See results in below MATLAB Plot Output box & Output box. I hope you have your results in a field(s) of your channel(s).

   Maybe this can be a start point

% ---------------------------------------------
% ---------------------------------------------
% http://www.mathworks.com/help/matlab/ref/annotationtextbox-properties.html
% ---------------------------------------------
currentTemp = thingSpeakRead(58826,'Field',1) % 58826 my public channel
currentHume = thingSpeakRead(58826,'Field',2) % 58826
str={[num2str(currentHume) '%'],[num2str(currentTemp) '°C']};
% --------------------------------------------- izquier
annotation('textbox',[0.0 0.01 0.35 0.99],...
'BackgroundColor','0 1 0',...
'FaceAlpha',0.15,...
'Color','0 1 1',...
'LineWidth',2,...
'HorizontalAlignment','center',...
'VerticalAlignment','bottom',...
'LineStyle',':',...
'String',str,...
'FontSize',38);    %45
% --------------------------------------------- medio
annotation('textbox',[0.36 0.01 0.19 0.99],...
'BackgroundColor','1 0 1',...
'FaceAlpha',0.15,...
'Color','0 0 1',...
'LineWidth',2,...
'HorizontalAlignment','center',...
'VerticalAlignment','bottom',...
'LineStyle',':',...
'String',[num2str(currentHume) '%'],...
'FontSize',20);    %25
% --------------------------------------------- ajobadere
annotation('textbox',[0.56 0.01 0.43 0.65],...
'FontName','FixedWidth',...
'BackgroundColor','.2 .3 .5',... % 0 1 1
'FaceAlpha',0.95,...
'LineWidth',2,...
'HorizontalAlignment','right',...
'VerticalAlignment','top',...
'LineStyle',':',...
'Color','.51 .50 1',...
'String',[num2str(currentTemp) '°C'],...
'FontSize',43);    %30
% --------------------------------------------- arridere
annotation('textbox',[0.56 0.67 0.43 0.33],...
'FontName','FixedWidth',...
'BackgroundColor','1 1 0',...
'FaceAlpha',0.35,...
'LineWidth',2,...
'HorizontalAlignment','left',...
'VerticalAlignment','middle',...
'LineStyle',':',...
'Color','1 0 1',...
'String',['Otra Cosa'],...
'FontSize',20);  %15
% ---------------------------------------------
% ---------------------------------------------

Good luck Smile


Viewing all articles
Browse latest Browse all 1833

Trending Articles