Results 1 to 7 of 7

Thread: Scatter Chart Problem - Hinky Plot Display

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2018
    Location
    Texas
    Posts
    104

    Question Scatter Chart Problem - Hinky Plot Display

    I am working with a project dealing with plotting of X-Y data. I am doing testing using an example in our code bank, that was created by others, long ago, to test/demonstrate the plotting of random data points on top of fixed internal-to-the-chart boundary lines. As part of testing (and learning) I stripped out the random generated data points, and created a simple array (arrvalues) of some data points to plot.

    These values from arrvalues were assigned (in)to the "main" data array (LL_PI_DataArray ), and the rest of this main data array used for plotting (LL_PI_DataArray) was filled with the data for the various fixed lines. See Example Project posted as attachment.

    When I direct assign my data points in arrvalues to the plotting array LL_PI_DataArray .. as in

    Code:
    112     LL_PI_DataArray(1, 4) = arrvalues(1, 2)
    114     LL_PI_DataArray(2, 4) = arrvalues(1, 3)
    The arrvalues points plot fine, BUT, if I create the Array arrValues, and then instead of assigning them into the LL_PI_DataArray with statements as above, I try to assign these values to the LL_PI_DataArray directly, like this:

    Code:
    '>>>>> try to copy the values of the arrvalues array to the LL_PL_DataArray
        LL_PI_DataArray = arrvalues ' The offending statement
    the main fixed lines come out OK, but the data points from the arrValues are strange.

    Whats Wrong?

    I include the example Project.
    Attached Files Attached Files

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    35,627

    Re: Scatter Chart Problem - Hinky Plot Display

    Moved from the CodeBank, which is for finished snippets rather than questions.
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2018
    Location
    Texas
    Posts
    104

    Re: Scatter Chart Problem - Hinky Plot Display

    Quote Originally Posted by Shaggy Hiker View Post
    Moved from the CodeBank, which is for finished snippets rather than questions.
    Not familiar with this administrative aspect of the forum.. Question - If a project (like what I attached) is posted, does the system automatically include it in some other area for complete functionality code? I had attached the example so as to make the error-issue better apparent than posting out-takes from it. Should I have instead posted the code in the main body between CODE CODE of the forum editor?

    As to the question itself about the hinky error - It came to mind that maybe although I can "assign" one array to another array, that such action does not place the values of SoruceArray into Target Array? I am trying to avoid having to do an element by element looping placement of the data in SourceArray to Target Array, but maybe I indeed have to do that?

    I read another thread titled Copying-of-one-Array-to-another https://www.vbforums.com/showthread....ray-to-another and perhaps it is that a direct assignment only works if the data is non-string? My data is non-string, so I it looks like I am fallen into a rabbit hole ( of my own making).
    Last edited by clickman; Nov 23rd, 2020 at 06:32 AM.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Feb 2018
    Location
    Texas
    Posts
    104

    Re: Scatter Chart Problem - Hinky Plot Display

    My Bad. somehow I posted in the CodeBaqnk Section...I had not even noticed that section before.. Sorry Guys.

  5. #5
    PowerPoster
    Join Date
    Feb 2006
    Posts
    21,757

    Re: Scatter Chart Problem - Hinky Plot Display

    Quote Originally Posted by clickman View Post
    It came to mind that maybe although I can "assign" one array to another array, that such action does not place the values of SoruceArray into Target Array?
    What else do you think assignment might mean?

    Yes, array assignment copies the values. Both should be dynamic arrays and of the same data type.

  6. #6
    PowerPoster
    Join Date
    Feb 2017
    Posts
    2,774

    Re: Scatter Chart Problem - Hinky Plot Display

    Quote Originally Posted by dilettante View Post
    What else do you think assignment might mean?
    An alias?

  7. #7

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width