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

  • Home
  • SEARCH
  • 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 7008183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:42:08+00:00 2026-05-27T21:42:08+00:00

I can get a colored ListLinePlot by doing something like ListLinePlot[Range[420, 680, 20], ColorFunction

  • 0

I can get a colored ListLinePlot by doing something like

ListLinePlot[Range[420, 680, 20], ColorFunction -> "VisibleSpectrum", ColorFunctionScaling -> False]

Mathematica graphics

However, as indicated by the help file (“ColorFunction requires at least one dataset to be Joined“), if I do the equivalent

ListPlot[Range[420, 680, 20], ColorFunction -> "VisibleSpectrum", ColorFunctionScaling -> False]

Mathematica graphics

all my points are blue. Is there a nice way to get ColorFunction to work for ListPlot with Joined -> False?

That is, is there a nicer way to get something like

ListPlot[
 List /@ Transpose[{Range[(680 - 420)/20 + 1], Range[420, 680, 20]}], 
 PlotMarkers -> ({Graphics[{#, Disk[]}], 0.05} & /@ ColorData["VisibleSpectrum"] /@ Range[420, 680, 20])
]

?

Mathematica graphics

(Also, does anyone have an explanation of why Mathematica requires Joined -> True in order to make use of ColorFunction?)

Edit: I’m also looking for a way to do a similar coloring with ErrorListPlot in the ErrorBarPlots package.

  • 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-05-27T21:42:09+00:00Added an answer on May 27, 2026 at 9:42 pm

    The problem is, that Joined->True draws a Line[] which can be given VertexColors for each containing point. I assume doing the same for the points when setting Joined->False leads to situations where it does not work. Nevertheless, Line[] and Point[] work pretty much the same in your case. So what is about

    ListLinePlot[Range[420, 680, 20], ColorFunction -> "VisibleSpectrum", 
      ColorFunctionScaling -> False] /. Line[arg___] :> Point[arg]
    

    Mathematica graphics

    And, by the way, if your using a ListLinePlot only, where the only Line[] directives arising are the one from your data, this should work even if you have more datasets and {x,y} coordinates

    data = Transpose[Table[{{x, Sin[x]}, {x, Cos[x]}}, {x, 0, 2 Pi, 0.2}]];
    ListLinePlot[data, ColorFunction -> Hue] /. Line[arg___] :> Point[arg]
    

    Mathematica graphics

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can get the element like this $(#txtEmail) but I'm not sure how to
I CAN get the associated icon just fine, and draw it accordingly, however, I
I really like the colored manpages which can are achieved by export LESS_TERMCAP_mb=$'\E[01;31m' export
Can get all triples with value null in specific field? All people with date_of_birth
I can get easily see what projects and dlls a single project references from
I can get both System.Net.Mail and System.Web.Mail to work with GMail, but I can't
Logging can get complicated, quickly. Considering that you have some code, how do you
I can get the executable location from the process, how do I get the
I can get simple examples to work fine as long as there's no master
I can get a list of running threads from Process.GetCurrentProcess().Threads, but I need to

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.