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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:39:51+00:00 2026-05-26T12:39:51+00:00

I was initially attempting visualize a 4 parameter function with Plot3D and Manipulate sliders

  • 0

I was initially attempting visualize a 4 parameter function with Plot3D and Manipulate sliders (with two params controlled by sliders and the other vary in the “x-y” plane). However, I’m not getting any output when my non-plotted parameters are Manipulate controlled?

The following 1d plot example replicates what I’m seeing in the more complex plot attempt:

Clear[g, mu]
g[ x_] = (x Sin[mu])^2 
Manipulate[ Plot[ g[x], {x, -10, 10}], {{mu, 1}, 0, 2 \[Pi]}] 
Plot[ g[x] /. mu -> 1, {x, -10, 10}] 

The Plot with a fixed value of mu has the expected parabolic output in the {0,70} automatically selected plotrange, whereas the Manipulate plot is blank in the {0, 1} range.

I was suspecting that the PlotRange wasn’t selected with good defaults when the mu slider control was used, but adding in a PlotRange manually also shows no output:

Manipulate[ Plot[ g[x], {x, -10, 10}, PlotRange -> {0, 70}], {{mu, 1}, 0, 2 \[Pi]}]
  • 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-26T12:39:52+00:00Added an answer on May 26, 2026 at 12:39 pm

    This is because the Manipulate parameters are local.

    The mu in Manipulate[ Plot[ g[x], {x, -10, 10}], {{mu, 1}, 0, 2 \[Pi]}] is different from the global mu you clear on the previous line.

    I suggest using

    g[x_, mu_] := (x Sin[mu])^2
    Manipulate[Plot[g[x, mu], {x, -10, 10}], {{mu, 1}, 0, 2 \[Pi]}]
    

    The following works too, but it keeps changing the value of a global variable, which may cause surprises later unless you pay attention, so I don’t recommend it:

    g[x_] := (x Sin[mu])^2
    Manipulate[
     mu = mu2;
     Plot[g[x], {x, -10, 10}],
     {{mu2, 1}, 0, 2 \[Pi]}
    ]
    

    It may happen that you Clear[mu], but find that it gets a value the moment the Manipulate object is scrolled into view.

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

Sidebar

Related Questions

Initially I was getting a no SELECT privilege error when attempting to query contents
I'm attempting to place an image map into a jQuery UI dialog. Initially, the
This is driving me nuts. I have two tables that I am attempting to
I attempting to connect to a server via PHP fsockopen to initially get a
I'm attempting to write a search function for a database table that needs to
Initially let me give an overview of my application. I am attempting to use
Initially I thought this was going to work, but now I understand it won't
Initially I deployed packages on SQL server but since my machine is not having
Initially I had a method in our DL that would take in the object
Initially I wanted a checkmark where the text is placed on the left of

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.