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 6959187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:14:18+00:00 2026-05-27T15:14:18+00:00

I am trying to dynamically plot data contained in a matrix with Mathematica 7.

  • 0

I am trying to dynamically plot data contained in a matrix with Mathematica 7. The data is contained in it like this, obtained via a chemical model.

[year  H    He     Li     C     ...  C8H14+,Grain- ]
[0     0    0.03   0.009  1E-3  ...  0             ]
[100   .1   0.03   0.009  1E-3  ...  0             ]
[200   .2   0.03   0.009  1E-3  ...  0             ]
[300   .2   0.03   0.009  1E-3  ...  0             ]
[...   ...  ...   ...     ...   ...  ...           ]
[1E6   .5   0.03   0.003  1E-8  ...  1E-25         ]

The truth is, the matrix dimensions are 2001*1476 (2000 steps and first line for name, and 1475 compounds + 1 column for year), very heavy.
I am trying to plot any compound with a concentration / year plot. This works

Manipulate[
  ListLogLogPlot[data[[All, {1, i}]], PlotLabel -> data[[1, i]] ], 
  {{i, 2, "Compound"}, 2, compounds, 1}
]

where data is the matrix, and compounds a variable set at the number of modelized compounds (1475 here). “compound” is a label for the slider.
The problem is, the slider moves much to fast as a few centimeters browse through 1400+ items.
I tried to do a drop-down menu with

MenuView[
  Table[
    ListLogLogPlot[data[[All, {1, i}]],PlotLabel -> data[[1, i]]], {i, 2, compounds}
  ]
]

It also works, but this is a processor killer process (10+ minutes on a Xeon 16-core server executing 16 kernels), as Mathematica try to graph all plots before displaying any of them. Also the drop-down has no name, just a series of numbers (1 for hydrogen to 1475 for C8H14N+,Grain-), even though the plot has a name.

What I am searching a way to plot a graph only on demand, with a name display in the drop-down list (and if required H by default). OR a field where I can enter the name of the compound. This seems to be possible with Dynamic[ ] command, but I don’t manage to make it work properly.

Thanks

  • 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-27T15:14:18+00:00Added an answer on May 27, 2026 at 3:14 pm

    Mike’s suggestion is a good one but if you don’t want to go to the effort of putting it in a database, use the ContinuousAction->False option.

    testdata = 
      Join[{Table[ToString[series[i-1]], {i, 1475}]}, 
       RandomReal[{1., 100.}, {2000, 1476}]];
    
    Manipulate[
     ListLogLogPlot[testdata[[All, {1, i}]], 
      PlotLabel -> testdata[[1, i]]], {{i, 2, "Compound"}, 2, 1475, 1}, 
     ContinuousAction -> False]
    

    enter image description here

    To get a popup menu, use the {i,listofvalues} syntax for the controller specification.

    Manipulate[
     ListLogLogPlot[testdata[[All, {1, i}]], 
      PlotLabel -> testdata[[1, i]]], {i, Range[2, 1475]}, 
     ContinuousAction -> False]
    

    enter image description here

    This works pretty fast on my system. (Two year old MacBook Pro)

    A fancier version:

    spec = Thread[Range[2, 1476] -> Table[ToString[series[i]], {i, 1475}]];
    
    Manipulate[
     ListLogLogPlot[testdata[[All, {1, i}]], 
      PlotLabel -> testdata[[1, i]]], {{i, 2, "Compound"}, spec}, 
     ContinuousAction -> False]
    

    enter image description here

    And if all you want to do is step through the images, click on the little plus next to a slider controller to get more detailed controls.

    enter image description here

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

Sidebar

Related Questions

I'm trying to dynamically create buttons at runtime with PyQT4.7 However, this being my
I'm trying to dynamically create this function: svg.path($('#shape23'), path.move(333,410) .smoothC(333,410,333,410) .smoothC(217.5,415.75,217.5,415.75) .smoothC(333,500,333,500) .close(), {fill:
I am trying to dynamically change a picture when I click on it, via
I am trying to dynamically (i.e. via code) bind a directory to a asp.net
I'm trying to dynamically load modules I've created. Right now this works properly: import
I'm trying to dynamically add results to this display and I simply want to
Summary: Trying to dynamically add heading rows to a ListView via a custom adapter
I'm trying to dynamically add elements to a vector that is contained within a
I am trying to dynamically add data points to jqplot as a result of
I am trying to plot few points dynamically on my Custom View using Quartz

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.