how to make a plot with three variables, one as a vector, in Matlab app designer?

Hi
I have some data, some arrays with name temperature, activity and then I have two arrrays named weight percent best_salt_1 and weight percent best_salt_2 that I will combine into a vector or to an array with one row and two columns for each set of values . And then I want to plot the data to visualise the information. But I dont have the newest version of Matlab , dont want to upgrade my version either. Hence I cant use the gscatter function that can make it possible to visualize all the info I want in my plot.
Then my question if whether I can use a trick like splitapply so everything I want to visualise here is possible..?

7 Comments

gscatter has been around since R2006. It is hard to imagine your Matlab version is older than that.
It is in the Statistics TB and not base MATLAB, however.
@Muazma Ali - provide some more specifics on just what the data sizes are and which is to be plotted against which.
But, certainly if you create or have a gouping variable, the splitapply workflow could be used to create the desired plot. But, so could simply plotting the various pieces separately using hold on
I'd think some of the 3D visualizations would work if you size the data appropriately. A function like meshgrid could help with that.
Hi
Activity and temperature are arrays with one colum and a user defined row nr, for instance 25. Weight percent best salt 1 and weigt percent best salt 2 are also one column arrays with many rows, but these two I want to combine so this becomes a grouping variable, but I dont know how I can join these two arrays horizontally. And yes I also want another grouping variable consisting of an array called combination_of_salts.
In other words I want to plot temperature versus activity grouped by combination_of_salts and their weightpercentages that should be found in one array.
Consider sharing some sample data we can use to try some things out. Also, run the command ver and share the output with us.
It sounds like you want to create a 2D plot of Activity vs temperature, and have the markers be unique by group.
You've defined 3 grouping variables: Weight percent best salt 1 & 2, and combination_of_salts. You can use findgroups or groupsummary to create a variable identifying what gorup each row belongs to.
No, I just have two grouping variables: I want to join the two arrays called weight_percent_best_salt_1 and weight_percent_best_salt_2, n that would be one grouping variable then I have combination_of_salts as the other grouping variable. Will soon share some sample data👍
The grouping variable value for the first two will be the same, then (say 1), while the other will be 2. Note you can use a categorical variable in a table with any group name desired, not just a number.

Sign in to comment.

Answers (0)

Categories

Products

Asked:

on 23 Mar 2026

Edited:

dpb
on 5 Apr 2026

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!