• Home
  • About Us
  • Contact Us
  • Privacy Policy
  • Special Offers
Business Intelligence Info
  • Business Intelligence
    • BI News and Info
    • Big Data
    • Mobile and Cloud
    • Self-Service BI
  • CRM
    • CRM News and Info
    • InfusionSoft
    • Microsoft Dynamics CRM
    • NetSuite
    • OnContact
    • Salesforce
    • Workbooks
  • Data Mining
    • Pentaho
    • Sisense
    • Tableau
    • TIBCO Spotfire
  • Data Warehousing
    • DWH News and Info
    • IBM DB2
    • Microsoft SQL Server
    • Oracle
    • Teradata
  • Predictive Analytics
    • FICO
    • KNIME
    • Mathematica
    • Matlab
    • Minitab
    • RapidMiner
    • Revolution
    • SAP
    • SAS/SPSS
  • Humor

Using Thread with Plot is producing error messages

October 2, 2018   BI News and Info

I have this code:

phi[t_] := t_0 + c*Exp[-k*t];
k = 1.5; t_0 = 60;
Thread[
  Plot[Table[phi[t] /. c -> i, {i, -15, 15, 5}], {t, 0, 3}, 
    PlotRange -> {45, 75}]]

Which, as expected, produces the plot:

HhE2H Using Thread with Plot is producing error messages

However, mathematica is also spitting some weird error messages at me:

Thread::tdlen: Objects of unequal length in z9FYn Using Thread with Plot is producing error messages cannot be combined.

When I hover over the image in the error I get a list of a dozen other error messages:

RGBColor called with 1 argument; 3 or 4 arguments expected.

Coordinate Skeleton[77] should be a pair of numbers, or a Scaled or Offset form.

Coordinate Skeleton[77] should be a pair of numbers, or a Scaled or Offset form.

Coordinate Skeleton[77] should be a pair of numbers, or a Scaled or Offset form.

Coordinate Skeleton[52] should be a pair of numbers, or a Scaled or Offset form.

Coordinate Skeleton[77] should be a pair of numbers, or a Scaled or Offset form.

Coordinate Skeleton[77] should be a pair of numbers, or a Scaled or Offset form.

Coordinate Skeleton[77] should be a pair of numbers, or a Scaled or Offset form.

I searched for the three different types of error messages given and none of the results I found seem to be relevant to my “problem” (If you can call it that: my graph looks fine, mathematica is just complaining for some weird reason).

Is this a bug, or is there something subtle that I’m doing wrong?

1 Answer

Plot has the native ability to “thread” the functions.

phi[t_] := t0 + c*Exp[-k*t];
{k, t0} = {1.5, 60};
Plot[Table[phi[t] /. c -> i, {i, -15, 15, 5}] // Evaluate, {t, 0, 3},  PlotRange -> {45, 75}]

7ZQoA Using Thread with Plot is producing error messages

Also note that t_0 is not $ t_0$ as in $ \LaTeX$ , because t_ represents the Blank[] pattern associated with t.

And you can force the evaluation of the argument to Plot with Evaluate to make different colors.

Let’s block ads! (Why?)

Recent Questions – Mathematica Stack Exchange

Error, Messages, plot, Producing, Thread, using
  • Recent Posts

    • Export with large E instead of small e
    • You’ll be back
    • Building AI for the Global South
    • Dapper Duo
    • AI Weekly: These researchers are improving AI’s ability to understand different accents
  • Categories

  • Archives

    • March 2021
    • February 2021
    • January 2021
    • December 2020
    • November 2020
    • October 2020
    • September 2020
    • August 2020
    • July 2020
    • June 2020
    • May 2020
    • April 2020
    • March 2020
    • February 2020
    • January 2020
    • December 2019
    • November 2019
    • October 2019
    • September 2019
    • August 2019
    • July 2019
    • June 2019
    • May 2019
    • April 2019
    • March 2019
    • February 2019
    • January 2019
    • December 2018
    • November 2018
    • October 2018
    • September 2018
    • August 2018
    • July 2018
    • June 2018
    • May 2018
    • April 2018
    • March 2018
    • February 2018
    • January 2018
    • December 2017
    • November 2017
    • October 2017
    • September 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • April 2017
    • March 2017
    • February 2017
    • January 2017
    • December 2016
    • November 2016
    • October 2016
    • September 2016
    • August 2016
    • July 2016
    • June 2016
    • May 2016
    • April 2016
    • March 2016
    • February 2016
    • January 2016
    • December 2015
    • November 2015
    • October 2015
    • September 2015
    • August 2015
    • July 2015
    • June 2015
    • May 2015
    • April 2015
    • March 2015
    • February 2015
    • January 2015
    • December 2014
    • November 2014
© 2021 Business Intelligence Info
Power BI Training | G Com Solutions Limited