Continuously scrolling line graph - how do you do this?

I am trying to create a line graph that scrolls to the left over time; just like a resource monitor available on the Linux platform. The graph is long and flat (horizonally) and as system resources are either used or released the graph contiuously displays this with a continuous line that moves from right to left.
Has anyone done something like this before or seen an example of something similar?
So far I have a graph displayed on a panel, but I cannot figure out how to retain the current points plotted, transform the graph to the left and continue the line from that point. I do not want to have to store all the points in an array (or Vector) and plot the entire graph each pass.
Any clues?
thanks,
Lon Allen
Message was edited by:
LonAllen

I went ahead and just set up Arrays to cover the points on the graph and am using drawPolyline(int xpoints[], int ypoints[], int npoints) to do this. I initialized the arrays at the far right bottom point (650, 100) and increment (actually decrement) the x values each pass that I want an update. The y values actually contain useful information so that the graph changes in the vertical as well. I also increment the npoints value to make the graph creep across the graph until all points are filled. I had to delete the amount I wanted the y to change from the initial values since the far right bottom corner is (650, 100). I shift the previous plotted points in the arrays over to the left to get the graph to travel to the left.
Unless you have a better way to do this I guess I've solved my problem.
Lon Allen

Similar Messages

  • Recently updated iMac and macbook pro to mountain lion.   Now mouse and track pad operate backwards i.e.  scroll up and page scrolls down. how do you fix this?

    recently updated iMac and macbook pro to mountain lion.   Now mouse and track pad operate backwards i.e.  scroll up and page scrolls down. how do you fix this?

    System Preferences > Mouse -- deselect "Scroll direction: natural." Do the same for the trackpad > Scroll & Zoom preference.

  • HT2477 Just bought a Mac book and the set up is with the Voice over key commands,how do you switch this off as it is painfull to use and use the scroll pad

    Just bought a Mac book and the set up is with the Voice over key commands,how do you switch this off as it is painfull to use and use the scroll pad?

    It's the button (key) that is labelled Control.
    Each of the modifier keys and similar keys has its own symbol; this makes listing command keys easier to do. The Command key is usually the only key which has its symbol printed on the key. If you open Keyboard Viewer (in the Input menu, the one which displays the flag in the main menu bar), you can see what symbol refers to which key.

  • I have tried to buy something from app store but it says that i cant buy the song because it says i have to activate the email but im at my home page for my email and i havent recived it. i have an @line email. how do i access this email.

    i have tried to buy something from app store but it says that i cant buy the song because it says i have to activate the email but im at my home page for my email and i havent recived it. i have an @line email. how do i access this email.

    Have you checked your email's spam folder to make sure an email from Apple has not been put in there?

  • If you right-click an image you can select to "Block Images" from the site, but how do you reverse this choice?

    If you right-click an image on a web page you can select to
    "Block Images from [the url of the site]".
    This works well, particularly to make the page printer-friendly, but how do you reverse this choice to see the images again?

    You can see all permissions for the current page in Tools > Page Info > Permissions
    If it is from a different domain then use this:
    *A way to see which images are blocked is to click the favicon (<i>Site Identification</i> icon) on the left side of the location bar.
    *A click on the "More Information" button will open the Security tab of the "Page Info" window (also accessible via "Tools > Page Info").
    *Open the <i>Media</i> tab of the "Page Info" window.
    *Select the first image and scroll down though the list with the Down arrow key.
    *If an image in the list is grayed and there is a check-mark in the box "<i>Block Images from...</i>" then remove that mark to unblock the images from that domain.

  • Screen is fussy with lines.  How do I resolve this?

    Screen is fussy with lines.  How do I resolve this?

    Sounds like you may have a screen hardware problem with your iPad.  Take it to an Apple store so they can help you and let you know what it will cost to repair it

  • How do you reactivate this phone in another family member name after the original owner now deceased

    How do you reactivate this phone Verizon Droid Maxx in another family member name after the original owner now deceased

    To switch it to another number, you need to activate another phone on the number you no longer need (or have Verizon cancel it for the deceased member).  Once that line is no longer active, you can activate the phone on another number - have Verizon CS at a store help you, or follow the steps on verizonwireless.com from the account of the person you do want it to be activated for.

  • In Adobe Digital Editions a ding sounds everytime I use the arrow buttons to scroll...how do I stop this?

    In Adobe Digital Editions a ding sounds everytime I use the arrow buttons to scroll...how do I stop this?

    You may have switched on [http://kb.mozillazine.org/accessibility.browsewithcaret caret browsing]: press F7 to toggle.
    See http://kb.mozillazine.org/Scrolling_with_arrow_keys_no_longer_works
    Tools > Options > Advanced : General: Accessibility: [ ] "Always use the cursor keys to navigate within pages"
    See also http://kb.mozillazine.org/Accessibility_features_of_Firefox

  • Hi! I have no scroll-bar anymore. how can I reactivate this??

    hi! I have no scroll-bar anymore. how can I reactivate this??

    Yeah. That's OS Lion for you. No scrollbarzoom anymore. No idea why they disimplemented that - but it is in Lion only, not a Logic thing. 9.1.6 + Lion = no scrollbarzoon, Logic 9.1.6 + OS SnowLeopard = scrollbarzoom.
    It zucks, I know.

  • HT1349 my phone keeps freezing on settings, I cannot make or receive a call but everything else is working including internet and mail. where it should be showing the reception bars it is only showing a broken line. How do I resolve this?

    my phone keeps freezing on settings, I cannot make or receive a call but everything else is working including internet and mail. where it should be showing the reception bars it is only showing a broken line. How do I resolve this?

    If you are not showing reception bars, then I don't know how the data is working? Have you tried doing a reset? Hold the sleep/wake and home buttons together until you see the Apple logo and then release. After the phone restarts, check to see if it works. If that doesn't help, then try removing the SIM card, then reinserting it. If that doesn't help, then contact your carrier for assistance in calling.

  • How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    How do I use the time capsule to share itunes music between multiple apple devices? Also, is it possible to control the music on one device using another, and how do you set this up?

    unless i'm missing something, i think you got mixed up, this is easy google for walk throughs
    i'm assuming this is the new 3tb tc AC or 'tower' shape, if so, its wifi will run circles around your at&t device
    unplug the at&t box for a minute and plug it back in
    factory reset your tc - unplug it, hold down reset and keep holding while you plug it back in - only release reset when amber light flashes in 10-20s
    connect the tc to your at&t box via eth in the wan port, wait 1 minute, open airport utility look in 'other wifi devices' to setup the tc
    create a new wifi network (give it a different name than your at&t one) and put the tc in bridge mode (it may do this automatically for you, but you should double check) under the 'network' tab
    login to your at&t router and disable wifi on it
    add new clients to the new wifi network, and point your Macs to the time machine for backups

  • HT4191 iPhone Local Storage "My iPhone" - How do you create this folder for use by the Notes app on a iPhone or iPad?  If I want to keep some notes only on my device and not in a cloud environment associated with an e-mail account.

    iPhone Local Storage "My iPhone" - How do you create this folder for use by the Notes app on a iPhone or iPad?  If I want to keep some notes only on my device and not in a cloud environment associated with an e-mail account.  I've seen reference to the  "My iPhone" local storage put no mention on how you create this folder or access this folder within the Notes app.  I realize storing information in a local storage like this provides no syncing between other iDevices but that is exactly what I'm looking for.  I'm running iOS7.0.4 on a iPhone 5S, and a iPad Air.  Any help would be greatly appreciated.

    If you go to Settings > Notes > Default Account you will see "On My iPhone" as the default account and the only choice if you have not enabled syncing Notes in Settings >iCloud or Settings > Mail, Contacts, Calendars. If you have enabled syncing you can still select "On My iPhone" as the default account. When you are in the Notes app you won't see any accounts listed if you have not enabled syncing because they are all in the On My iPhone account and that is the only place possible. It is not a folder that you create.

  • I need to create a ghost image of my G4 iBook (OSX 10.3.9) and replace the OS9 on my G4 tower with the created iBook ghost image. How do you do this?

    I need to create a ghost image of my G4 iBook (OSX 10.3.9) and replace OS9 on a G4 tower with the Ghost image. How do you do this? Will my applications still work?
    The iBook is running Pather, i have tons of programs i use on it, project files, etc... and my G4 Mac tower is more powerful, faster, and more reliable than the iBook. I basiclly just want to take the entire OS, programs and files... create an image, and drop the image on the G4 Tower so it basically will function just like the iBook. Like a mirror image of everything that is on the iBook.  I know that you can create image files in the Disk Utility on Panther, but will that back up the entire OS with settings, programs, files and all?  ive never done anything like this before, so i wanted to post this up to see if i would get an answer. In the meantime, im reading "Mac OS X, Help Desk Essentials By Owen Linzmayer" to see if i can find the steps to do this.
    Any help would be greatly apprciated. Much thanks!

    Can't be done as an exact copy from one Mac to the other.  The operating systems are system specific. First make sure your system doesn't need a firmware update to get 10.2 or later on it. You'll need to install 9 on it if it does, direct from a 9 retail CD that is compatible with it *.  This disc can't say Upgrade, Dropin, or OEM. To determine compatibility, identify your G4 tower:
    http://support.apple.com/kb/HT3082
    http://docs.info.apple.com/article.html?artnum=42739
    Then look at the OS 9 compatibility:
    http://docs.info.apple.com/article.html?artnum=25517
    Then apply the correct update
    http://docs.info.apple.com/article.html?artnum=86117
    The last Mac OS 9 to come retail is 9.2.1, and that's newer than 9.0.4, 9.0.2, and 9.1.
    Your ghost image can be done using cloning software, but then you'll have to use a retail 10.3 installer and 10.3.9 combo update on the G4 tower.  Then use the Migration Assistant to import the data from the clone of the iBook. The 10.3 retail disc looks like * and does not say upgrade, dropin, or OEM.  The 10.3.9 combo update is here:
    http://www.apple.com/support/downloads/macosxcombinedupdate1039.html
    The clone to an external hard drive can be done with these instructions*:
    http://www.macmaps.com/backup.html The import of the external hard drive with the migration assistant can be done with these instructions:
    http://docs.info.apple.com/article.html?artnum=25773

  • After upgrading my iPhone4 to the latest IO it no longer connects to wifi, how do you fix this?

    After upgrading my iPhone4 to the latest IO it no longer connects to wifi, how do you fix this?

    knifepainter wrote:
    What I know is that the phone worked perfectly fine until I upgraded the software. I've tried resetting the network settings to no avail. I've shut the phone off, put it in a ziplock baggie and then into the freezer for 15 minutes. This made the wifi work temporarily but then it goes back to being grayed out. The wifi does not work at other wifi sites away from my home as well. Seems like an apple issue to me and would appreciate someone coming up with a fix, apparently I'm not the only one having this problem. Thanks for replying to my query, any ideas?
    It's likely a hardware issue.  The iOS will not directly cause this issue.
    Use this article first:
    iOS: Wi-Fi settings grayed out or dim - http://support.apple.com/en-us/TS1559
    If that fails to resolve it, then try setting it up as new and testing again.
    How to erase your iOS device and then set it up as a new device or restore it from backups - http://support.apple.com/en-us/HT4137
    If the issue remains even after set up as new, it's a hardware problem, not a software problem.  You'll need to contact Apple for you hardware service options.  If within warranty it should be free.  If not, expect to pay $149 USD + tax if it's an iPhone 4, $199 USD + tax if it's an iPhone 4S.

  • Need to show proof of purchase to my insurance company, but my phone was replaced by apple so has a different imei number to the one on my receipt, how do you sort this out??

    Need to show proof of purchase to my insurance company, but my phone was replaced by apple so has a different imei number to the one on my receipt, how do you sort this out??

    Contact Apple and see if they can provide any documentation of the device swap.

Maybe you are looking for

  • Can a site use cookie info from separate Firefox windows, or just between tabs in the same window?

    Hi! I apologize for how crazy my question sounds,, (& for everything that follows), but I'm at a loss as to the correct wording...I hope my explanation will clarify things, at least enough so that someone understands what I'm trying to say! Wish me l

  • How can I pre-populate a web app input form with data from a webform in the CRM?

    Scenario: A customer fills a registration webform. The customers data is stored in BC CRM as usual. This step provides a lead to marketing unit and the team makes a follow up. Upon completion of internal processes. The workflow initiated by this cust

  • 10.5.2 and Windows 2003 Domain and Home Folders

    Hello, This has probably been beaten to death but cant seem to find the answer that I'm looking for. I can add the mac to the 2003 domain fine with no problems and can get the user authentication fine, access to the network shares and printers. The q

  • Adobe form in webdynpro ABAP

    Hi, We have developed a webdynpro application which opens up a Adobe form . The problem is for a user who is uisng IE 7 and adobe version 8 or higher, when he runs the application the adobe form does not open up he has a small 'X' sign coming up inst

  • Merging page together in Word export

    Hello, I am currently trying to do a word export. Everything works fine. A concurrent product of CR has the capability of putting each object of a detail section together into a drawing area when exporting to Word or RTF. With this I can click the dr