Matlab visualisation not working | MATLAB | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Register Lost password?
sp_Feed sp_TopicIcon
Matlab visualisation not working
Avatar
trach555

Silver
Forum Posts: 10
sp_UserOfflineSmall Offline
1
September 22, 2017 - 3:11 pm
sp_Permalink sp_Print

Hi,

I am using 2d plot with two y-axes. It was working when I configured it, but on another day it stopped working.

When I edit the code and hit "save and run" button I see info that Matlab code run successfully, but there is no Matlab plot output.

What is going on?

Avatar
getty
New Member
Forum Posts: 1
sp_UserOfflineSmall Offline
2
September 24, 2017 - 4:51 am
sp_Permalink sp_Print

trach555 said
Hi,

I am using 2d plot with two y-axes. It was working when I configured it, but on another day it stopped working.

When I edit the code and hit "save and run" button I see info that Matlab code run successfully, but there is no Matlab plot output.

What is going on?  

^ Exactly the same problem as above. The visualizations ceased to work a few days ago.

Avatar
Vinod

Forum Posts: 183
sp_UserOfflineSmall Offline
3
September 24, 2017 - 11:42 pm
sp_Permalink sp_Print

Thank you for reporting this. I am unable to reproduce this on my channels.

Could one of you facing the problem please share a screenshot, or share the channel privately with me (vinod<period>cherian@mathworks<period>com)? 

If you don't mind sharing the code used on the visualization with the read API keys redacted, that would be helpful in debugging the issue.

Avatar
Vinod

Forum Posts: 183
sp_UserOfflineSmall Offline
4
September 25, 2017 - 2:04 pm
sp_Permalink sp_Print

For the folks who reported this, are you using data from the weather channel? Are you pre-processing your data to remove NaN's? Before plotting your data can you display the data that is being plot and observe if it has NaN's in them?

Avatar
LvdK
New Member
Forum Posts: 1
sp_UserOfflineSmall Offline
5
September 25, 2017 - 5:29 pm
sp_Permalink sp_Print

Hello,

I think I have the same problem :

I already had an old chart visualization on my channel from months ago, and I can see my data updating.

The problem is my NEW plot visualizations don't work too.

When  hit "save and run" , I see info that Matlab code ran OK, but there is no  plot output, only a blank window

Tried some examples, but plot visualizations don't work.

What is happening ?

Avatar
trach555

Silver
Forum Posts: 10
sp_UserOfflineSmall Offline
6
September 26, 2017 - 6:42 am
sp_Permalink sp_Print

Hi,

There are no NaN's in data. If I scratch semicolon after subsetting data1 I can see data in Output window, but there is no plot in Matlab plot Output window (and also on private view there is only empty "iframe").

I use Chrome. On Microsoft Edge it behaves exactly the same.

My channel is marked as public, so you do not need API key. Below is my code. But the same happens when I just create new Matlab Visualisation and put channelId and fieldId (no matter which visualisation or even analysis I chose). 

% Template MATLAB code for visualizing data using the THINGSPEAKPLOTYY
% function.

% Prior to running this MATLAB code template, assign the channel ID to read
% data from to the 'readChannelID' variable. Also, assign the field IDs
% within the channel that you want to read data from to 'fieldID1', and
% 'fieldID2'.

% TODO - Replace the [] with channel ID to read data from:
readChannelID = 212263;
% TODO - Replace the [] with the Field ID to read data from:
fieldID1 = 7;
% TODO - Replace the [] with the Field ID to read data from:
fieldID2 = 7;

% Channel Read API Key
% If your channel is private, then enter the read API
% Key between the '' below:
readAPIKey = '';

%% Read Data %%
n = 30;

% Read first data variable
[data1, time1] = thingSpeakRead(readChannelID, 'Field', fieldID1, 'NumPoints', n, 'ReadKey', readAPIKey);
data1 = data1(1:2:end, 1);
time1 = time1(1:2:end, 1);

% Read second data variable
[data2, time2] = thingSpeakRead(readChannelID, 'Field', fieldID2, 'NumPoints', n, 'ReadKey', readAPIKey);
data2 = data2(2:2:end, 1);
time2 = time2(2:2:end, 1);

%% Visualize Data %%
if (min(data1) > 0)
thingSpeakPlotYY(time1, data1, time2, data2, 'Color1', [0.35 0.0 0.0], 'Color2', 'blue', ...
'LineWidth1', 2,'LineWidth2', 2, 'YLabel1', 'G_Humidity', 'YLabel2', 'Photo');
else
thingSpeakPlotYY(time1, data1, time2, data2, 'Color1', 'blue', 'Color2', [0.35 0.0 0.0], ...
'LineWidth1', 2,'LineWidth2', 2, 'YLabel1', 'Photo', 'YLabel2', 'G_Humidity');
end

Regards

gc

Avatar
Vinod

Forum Posts: 183
sp_UserOfflineSmall Offline
7
September 26, 2017 - 9:50 am
sp_Permalink sp_Print

We're able to reproduce the issue. It appears to impact the thingSpeakPlot, thingSpeakPlotYY, and similar functions. 

Note that visualizations using the MATLAB plot, plotYY and similar functions are unaffected.

We are investigating a solution that does not require any code changes to your code. Thank you for your patience as we work to resolve the issue.

Avatar
trach555

Silver
Forum Posts: 10
sp_UserOfflineSmall Offline
8
September 27, 2017 - 4:48 am
sp_Permalink sp_Print

New version of Java killed functionality...?

Avatar
Vinod

Forum Posts: 183
sp_UserOfflineSmall Offline
9
September 28, 2017 - 12:28 pm
sp_Permalink sp_Print

A fix was deployed earlier today that restored full functionality. Everything is working as documented.

Please let us know if you are still seeing any issues.

Avatar
trach555

Silver
Forum Posts: 10
sp_UserOfflineSmall Offline
10
September 28, 2017 - 4:07 pm
sp_Permalink sp_Print

Yes, it is working now.

Is it intentional behaviour that Matlab visualisation can be displayed only in private view? I found some info, that Matlab visualisations are preferred option for public view instead of plugins like google gauge for example which cannot be used in public view. Even, the comment for for multiple series chart plugin says

"NOTE: This plugin will not be visible on public views of a channel.
If you intend to make your channel public, consider using the
MATLAB Visualization App to create your visualizations."

Regards

gc

Avatar
Vinod

Forum Posts: 183
sp_UserOfflineSmall Offline
11
September 28, 2017 - 4:54 pm
sp_Permalink sp_Print

It is possible to add a MATLAB visualization to the public view of your channel. Steps:

1) Make your channel public

2) On the MATLAB visualization page, check the checkbox that says "Create a public URL"

3) On the same page, enable the checkbox to add the visualization to the public view of the channel.

Let me know if that doesn't work. 

Avatar
trach555

Silver
Forum Posts: 10
sp_UserOfflineSmall Offline
12
September 29, 2017 - 4:39 pm
sp_Permalink sp_Print

Yes, it works.

It wasn't clear for me that I must "create a public URL". I just saw the tooltip, which appear when you drug mouse on the checkbox "public view" - it says "Matlab visualisation is private" (when checkbox "create public url" is not marked).

Thanks.

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online: jacktheripper125, pudderz
19 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

bbruno22

pudderz

Utkya

Poornak26

LindasHed

reddysiva

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee