+ Reply to Thread
Results 1 to 7 of 7

Plotting Binary Numbers via VBA

  1. #1
    Registered User
    Join Date
    04-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    76

    Plotting Binary Numbers via VBA

    I am trying to create a program that does similar things to another program. One thing I need to do is to plot digital data (binary 1s and 0s). Please see the attached samples. The word document shows a sample plot from the program I am trying to imitate. The spreadsheet has all the sample data used to come up with the plot in the word document. In the plot, when the lines are bold, the digital element is picked up (binary 1), and when they are thin, the digital element is not picked up (binary 0). Ideally, the plot that I create in Excel with VBA will look at least somewhat like the sample plot I have provided. Thanks in advance for your help!
    Attached Files Attached Files

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,490

    Re: Plotting Binary Numbers via VBA

    You can make it using xy-scatter.
    For each data line you need 2 series.
    One to plot thin line for 0's
    The other to plot thick line for 1's

    You can use formula to generate the xy values and #N/A#s but you will need to remove the #N/As in order to get breaks in the lines.

    First copy the formula and paste special values. Then Find/Repalce #N/As with nothing.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    04-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    76

    Re: Plotting Binary Numbers via VBA

    Thanks for the response. The digital plots look great! I am sorry to ask you this, but could you provide me with some VBA code to create those plots? I am very new to VBA, so it would probably take me a long time to get some working code for it. I may try to record a macro and see if that helps. Also, my project needs to be able to plot a variable amount of digitals. The user picks which ones, and then the plotting button should plot whichever digitals the user desires. I will be utilizing a listbox transfer scheme to get from the total list of digitals to the ones the user wishes to plot. Any help on this would be greatly appreciated, as my project is due next Monday, and I still have a pretty good bit of other stuff to do with it. Last thing, is there any way to only show one entry per digital in the legend? If anyone else also has a solution, please feel free to post. Thanks

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,490

    Re: Plotting Binary Numbers via VBA

    The forum does free support not free work.

  5. #5
    Registered User
    Join Date
    04-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    76

    Re: Plotting Binary Numbers via VBA

    I understand. Can someone at least provide me with some support on how to get going with the VBA to do this? Maybe some helpful hints or tips that could help me get this info plotted? I can probably run with some things if I have a good starting point or foundation. Thanks

  6. #6
    Registered User
    Join Date
    04-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    76

    Re: Plotting Binary Numbers via VBA

    bueller, bueller??

  7. #7
    Registered User
    Join Date
    04-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    76

    Re: Plotting Binary Numbers via VBA

    i have posted this question on other forums since i am in such a deadline crunch. to follow rule 8, here are the links to my cross-posts:
    http://www.ozgrid.com/forum/showthread.php?t=164812
    http://www.mrexcel.com/forum/showthread.php?t=631716

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1