Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Question re Scales when using Surface Command

    Hi everyone,

    So I'm using the surface command in order to create 3-D surface plots, and I cannot figure out how to reverse the scales so as to match them with each other.
    My original plot is the following, where you can see how the x and y axes are not matching (i.e. the higher end of the x-axis runs into the lower end of the y-axis).

    * command: surface wv_extrinsic_mean jq_extrinsic_mean wc_index, title ("Example 1") xlabel(-2(1)2) ylabel(-2(1)2)

    Click image for larger version

Name:	Stata Example1.jpg
Views:	1
Size:	40.6 KB
ID:	1706769



    Then I tried to use the reverse command (for both the x-axis [example below] and y-axis separately and together), but it still did not solve the problem:

    * Command: surface wv_extrinsic_mean jq_extrinsic_mean wc_index, title ("Example 2") xlabel(-2(1)2) ylabel(-2(1)2) xscale(reverse)

    Click image for larger version

Name:	Stata Example2.jpg
Views:	1
Size:	79.8 KB
ID:	1706770



    I also tried reversing the z-axis but received the following error message

    zaxis1.plotregion.zscale.reverse.set_true: class type not found
    r(4018);

    Any idea whether what I'm looking for here has a solution?
    Thank you!
    Last edited by Erez Garnai; 23 Mar 2023, 05:28.

  • #2
    Anyone...pretty please?

    Comment


    • #3
      You might get more response by giving us

      1. A full real name as requested.

      2. A data example.

      3. Explanation of the surface command -- where does it come from?

      4. The syntax you used for trying to reverse the z axis.

      I have never used surface that I can recall, so I bailed out at #3.

      More generally, as the meta-question here is Why did no-one answer?: reading and following our FAQ Advice increases the probability of a good answer, although nothing guarantees a probability of 1.

      Comment


      • #4
        Thanks for the clarification, Nick. I suppose it is too late to change my handle now...thanks anyway!

        Comment


        • #5
          No; it's not too late. See https://www.statalist.org/forums/help#realnames

          Comment

          Working...
          X