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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:49:30+00:00 2026-06-17T10:49:30+00:00

I’ve made a 3d surface plot in gnuplot, and I’m wondering if it’s possible

  • 0

I’ve made a 3d surface plot in gnuplot, and I’m wondering if it’s possible to plot an unrelated 2d line graph on the ‘wall’ of the y,z axis.
So in essence, I take my x,y line plot but paste it on to the y,z axis.

Similar to a contour plot on the x,y, under a 3d surface, but different.

  • 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-17T10:49:31+00:00Added an answer on June 17, 2026 at 10:49 am

    This may not be precisely what you are looking for, but it is a way to plot a function on a ‘wall’ of your splot box:

    #!/usr/bin/env gnuplot
    
    set term png 
    set output 'test.png'
    
    # this is the function you want on the wall
    myfun(x,y) = y**2
    
    # set the ranges manually
    xmin = -10 
    xmax = 10
    ymin = -10 
    ymax = 10
    
    x_range = xmax - xmin
    y_range = ymax - ymin
    
    scaler = 0.001
    x1 = xmin - x_range*scaler
    x2 = xmin + x_range*scaler
    x3 = xmax - x_range*scaler
    x4 = xmax + x_range*scaler
    y1 = ymin - y_range*scaler
    y2 = ymin + y_range*scaler
    y3 = ymax - y_range*scaler
    y4 = ymax + y_range*scaler
    
    xminwall(x,y) = (x > x1 && x < x2) ? myfun(x,y) : 1/0 
    xmaxwall(x,y) = (x > x3 && x < x4) ? myfun(x,y) : 1/0 
    yminwall(x,y) = (y > x1 && y < x2) ? myfun(x,y) : 1/0 
    ymaxwall(x,y) = (y > x3 && y < x4) ? myfun(x,y) : 1/0 
    
    splot sin(x), xminwall(x,y)
    

    Here is the result:

    enter image description here

    What the script does is plots the function you want to plot on the wall (myfun(x,y)) and does a splot of it, restricted to values that are very close to the wall. The surface mesh has a certain number of gridpoints, and one of those points is always at the x and y limits.

    In this example, if I had just done splot sin(x), y**2, I would have gotten two overlapping surfaces.

    I made four functions (xminwall, etc.) so you can plot on the wall at the x/y range minimum/maximum walls. Note that mufun(x,y) has to be a function of the correct x and y in order for the plot to show up properly on the wall, otherwise you might get a straight line.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
I have a text area in my form which accepts all possible characters from
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I want to construct a data frame in an Rcpp function, but when I
I need to clean up various Word 'smart' characters in user input, including but
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on

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.