Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9027841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:50:36+00:00 2026-06-16T06:50:36+00:00

I would like to plot a simple scatter graph in MATLAB, with marker colours

  • 0

I would like to plot a simple scatter graph in MATLAB, with marker colours varying from one end of the spectrum to the other (e.g. red, orange, yellow….blue, purple).

My data compares the amount of water in a river with the quality of the water, over time (3 simple columns: time, amount, quality). I would like to plot the x,y scatter plot of amount vs quality, but with the colour progressing over time, so that it is possible to see the progression of the quality over time.

I will need to produce many graphs of this type, so if I can find a piece of code that will work for any length of dataset, that would be really useful.

Many thanks in advance for helping a Matlab novice!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T06:50:37+00:00Added an answer on June 16, 2026 at 6:50 am

    You can use the color argument of scatter

    If your data are already sorted in time than simply use:

    % let n be the number of points you have
    cmp = jet(n); % create the color maps changed as in jet color map
    scatter(x, y, 10, cmp, 'filled');
    

    Otherwise you need to sort your data first:

    [time, idx] = sort(time);
    x = x(idx);
    y = y(idx);
    cmp = jet(n); % create the color maps changed as in jet color map
    scatter(x, y, 10, cmp, 'filled');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to plot a heatmap on a table imported from MATLAB. The
I would like to plot lines on a simple x,y graph to display in
I would like my Scatter graph I am making with Core Plot library to
I would like to plot a simple graphic. I have a dat set with
I've created a simple scatter plot in R with specific RGB color values like
I am making a very simple plot in R and would like the change
I would like simply to plot labels not to the vertex of the graph
I'm using Highcharts and would like to display a simple column graph, but instead
I would like to plot a simple interval on the number line in Mathematica.
I plot a simple linear regression using R. I would like to save that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.