How do I place text on a ScatterGraph and have an arrow point to a data point on a plot?

For example, show the minimum point with the string "MIN" and draw an arrow from the text to the minimum point.
I am using Measurement Studio 7.0 with C#. This could be accomplished in MS 6.0 with annotations.

The Measurement Studio 7.0 graphs (WaveformGraph and ScatterGraph) expose events that allow you to custom draw areas of the control. Most of these events appear as pairs of BeforeDraw____ and AfterDraw___. The BeforeDraw events are raised before the drawing begins and AfterDraw events are raised after the drawing has completed.
In your case, you can attach an event handler to the AfterDrawPlotArea event of the ScatterGraph since you want to draw on top of everything that is drawn in the plot area. In the event handler:
// Assuming e is the name of the AfterDrawEventArgs parameter.
// Find the minimum y-value on the first plot in the Plots
// collection of the graph.
double[] xData = scatterGraph1.Plots[0].GetXData();
double[] yData = scatterGraph1.Plots[0].GetYData();
if (yData.Length > 0)
double x = xData[0];
double yMin = yData[0];
for (int i = 1; i < yData.Length; ++i)
if (yData[i] < yMin)
x = xData[i];
yMin = yData[i];
// Map the data point to a point in device coordinates.
PointF minPoint = scatterGraph1.Plots[0].MapPoint(e.Bounds, x, yMin);
// Calculate the starting point for the line of the
// arrow.
PointF startingPoint = new PointF(minPoint.X + 1, minPoint.Y - 1);
PointF endingPoint = new PointF(minPoint.X + 10, startingPoint.Y - 9);
// Draw a vertical line representing the stick of the
// arrow from the point.
e.Graphics.DrawLine(Pens.White, startingPoint, endingPoint);
PointF leftArrowEnd = new PointF(startingPoint.X, startingPoint.Y - 3);
PointF rightArrowEnd = new PointF(startingPoint.X + 3, startingPoint.Y);
// Draw the arrows.
e.Graphics.DrawLine(Pens.White, startingPoint, leftArrowEnd);
e.Graphics.DrawLine(Pens.White, startingPoint, rightArrowEnd);
// Calculate the location of the text by centering it
// about the arrow.
SizeF textSize = e.Graphics.MeasureString("MIN", scatterGraph1.Font);
PointF textLocation = new PointF(endingPoint.X + 1, endingPoint.Y - (textSize.Height / 2));
// Draw the "MIN" string
e.Graphics.DrawString("MIN", scatterGraph1.Font, Brushes.White, textLocation);
Hope this helps.
Abhishek Ghuwalewala
Measurement Studio
National Instruments
Abhishek Ghuwalewala | Measurement Studio | National Instruments

Similar Messages

  • How do I enter text onto a PDF and have it automatically update in an Indesign file?

    I am trying to enter text into an application form and then include the updated application into an extended indesign file.  I would like to be able to change elements of the application, which would then automatically update in the Indesign file.  I am having trouble doing this.

    I received an application in PDF and want to fill it out with my personal text, but I would also like to include supplemental documents with the application and thus have placed the PDF and the other documents it into an Indesign file.  If I were to change some portion of the personal text in the PDF, it would be great if it could automatically update in the Indesign file.  How else would you suggest I go about doing this?
    Thanks!

  • How to allow non-text page into TOC and have it export to ePub?

    Hi there,
    I've got an InDesign book file with several document files added as "chapters."  One of these files is the title page of the book, which is composed entirely of graphic images (i.e. there is no text on the page).
    I want this page to be visible in the table of contents when exported for Kindle and/or ePub, but I can't for the life of me figure this out.
    I've tried creating a layer on the title page and adding "Title Page" text to it and applying the correct TOC style.  This gets the page on the TOC, but the "Title Page" text is visible.  I've tried turning off "Print Layer" and "Show Layer" for this layer, but the text is still visible on the page when exported.
    Any ideas?
    I'm beginning to think that I'm going to have to edit the TOC manually after it's exported, but I was trying to avoid this.
    Thanks,
    Kim

    Hi Wagner,
    Thanks for the reply.  I've tried what you suggested in #1.  In short, I:
    Created a style called Chapter Number Invisible based on my Chapter Header style, which is a TOC style.
    I made one change to this by making the color "Paper."
    I then added the text, "Title Page" to the title page and applied the style.
    Unfortunately, I don't think that Kindle export handles white or non-colored text, and thus, I still get the text showing on the page after export.
    Unless I'm doing something wrong, it looks like I'm going to have to edit the TOC manually, which is a pain.
    Thanks again,
    Kim

  • How can I place a MP4 into Dreamweaver and have it autostart when you load a web page?

    Hi All
    I am trying to place a MP4 video/music clip into a webpage.
    I would like it to auto start once you click on the page, play and then the page loads.
    Is this even possible?
    Thanks in advance to all those who will be able to help

    Video Streaming Basics -
    http://www.mediacollege.com/video/streaming/
    Embed Tag Attributes for QuickTime player -
    Look at AutoHref and AutoPlay
    http://www.apple.com/quicktime/tutorials/embed2.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • How do I place text from Pages in InDesign

    How do I place text from Pages in InDesign?

    You will need to export the text from Indesign as either .rtf or .doc files and import those.
    You can also cut and paste but I assume you have already tried these options and are not happy with the result, but haven't said why.
    Peter

  • When i Place a PSD in Indesign it comes in at 200+% while the image frame is considerably smaller. How do i place so that the image and image frame match?

    When i Place a PSD in Indesign it comes in at 200+% while the image frame is considerably smaller. How do i place so that the image and image frame match?

    Peter,
    The screenshots tell you everything.
    The second one tells you how the image frame is automatically set up after a one-click place. It's the blue stroked rectangle with the eight control points at each corner and mid-way along the line. This image frame is generated at a proportionally correct height and width for the image it contains.
    Now, if you look at the third screenshot (click on it to see it at a larger size), you will see I've used the direct selection tool (white arrow) to click on the image within the image frame. This CLEARLY shows the image (within the image frame) is substantially larger than the frame generated to contain it. This is indicated by the yellow stroked rectangle with the eight control points at each corner and mid-way along the line.
    Notice that the blue and yellow rectangles are vastly different sizes.
    In InDesign CS5.5, when i clicked to place the image, the image would fit perfectly within its image frame. the blue and yellow rectangles would match.
    I had no need to go click on the proportional fill and centre buttons like i need to do now in CC.
    I have a keyboard shortcut to place. I can't do File > Place for the amount of images i need to place.
    So to reiterate: How do i place an image so that the image and image frame match?

  • How do I read text from specific rows and columns in a tree structure?

    How do I read text from specific rows and columns in a tree structure? In a table you can specify the cell to read from but I have not been able to figure out how to do this with a tree structure.

    You need to set two properties to activate the correct cell and then you can read it's string property.
    The positioning properties are the "ActiveItemTag" and
    "ActiveColNum" properties. With them you select the tree item by it's tag and the active column. The string can then be read from the "Cell String" property.
    MTO

  • My husband uses adobe cs5. The clone tool isn't working and after resetting the tools adobe bridge now goes to picasa. How can we make the clone tool work and have bridge go to cs5 not picasa?

    My husband uses adobe cs5. The clone tool isn't working and after resetting the tools adobe bridge now goes to picasa. How can we make the clone tool work and have bridge go to cs5 not picasa?

    A lot more information about your hardware and software is needed.
    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CC", but something like CC2014.v.2.2) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    a screen shot of your settings or of the image could be very helpful too,
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • How do I delete photos in the icloud and have them stay gone?

    How do I delete photos in the icloud and have them stay gone!

    The only way you can do that is to import them into your library first, but you may have done that already.
    The easiest way to tell is to select a photo from the photostream album in iPhoto and ctrl-click on it, if it gives you the option to import it isn't in your iPhoto library, if it offers you the option to show in library it has already been imorted.

  • How can I tag photos on iOS7 iPhoto and have them sync back to OSX Aperture?

    How can I tag photos on iOS7 iPhoto and have them sync back to OSX Aperture?

    yeah the keynote they just did showed what appeared to be a new version of Aperture running on the Mac Pro so I've got a glimmer of hope they'll do some more updates in Dec.  If not there's always the feedback
    https://www.apple.com/feedback/iphoto.html
    https://www.apple.com/feedback/iphoto_ios.html

  • How do you record video with usb mic and have the audio from garageband be the sound when recording and not just your normal voice but garage band effects for youtube?

    How do you record video with usb mic and have the audio form garageband be apart of the video when recording, meaning the audio from garageband and echo  and not just your normal voice for youtube post?its not add the garageband audio its just normal voice from mic no  effects is going thru?

    Hi Life93,
    What you describe would be possible by recording your video, then removing the audio from it and adding audio from GarageBand once the video is in iMovie (I presume here that you are using iMovie for your video production. Other applications may need different methods.)
    See this thread on how to remove the audio from a clip in iMovie -
    Is there a way to separate audio from a video c...
    https://discussions.apple.com/thread/1779767
    To add audio from GarageBand use this article -
    iMovie '11: Add a sound clip to your project
    http://support.apple.com/kb/PH2255
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • How do i after down load creative cloud and have it in the tool bar , then click on it ,it brings up a box  called creative cloud then just rotates not bringing up any apps ?

    how do i after down load creative cloud and have it in the tool bar , then click on it ,it brings up a box  called creative cloud then just rotates not bringing up any apps ?

    Mac Spinning Wheel https://forums.adobe.com/message/5470608
    -Similar in Windows https://forums.adobe.com/message/5853430

  • How do you place text in a text frame, but with autoflow?

    I woudl like to place a tagged text file on a text frame rather than on a page, so i can put the contents into a pre-defined text frame, but still have the number of pages extended unitl the entire tagged text content is show.
    I can get autoflow with  Page place() function, which takes an option to turn on autoflow. However, this creates a new text frame, and I'd like the tagged text to go into a particular text frame. Unfortunately, the TextFrame place function does not seem to have an autoflow setting, that will duplicate the current page and flow text into the new page.
    Thanks,
      Read Roberts

    Hm,
    I would check for overflow, if then, create the new page, create your 'particular textFrame', set nextTextFrame of tf1 to your 'particular textFrame'
    Hans-Gerd Claßen

  • HT3529 How can you recover text messages in iphone that have been deleted?

    How can you recover text messages that have been deleted from an iphone?

    If the phone was backed up either to iCloud or iTunes on your computer BEFORE the texts were deleted, restoring the backup will restore the texts to your phone.  If they were not backed up, they're gone permanently.

  • How to export the text animation in Captivate and use it in Flash ?

    I have published the text animation as swf  and  tried to import it into flash as a movie clip but it does not seem to work.

    I have type the text " WELCOME"  font size 70 using  text animation and I want to use this as a movie clip in Flash.
    There is in the menu File ---> Export----> to CS5 Flash . This is not working for the animated text.
    I also tried publishing as swf  and import it into the library of  my Flash CS5.5 . This is not working as well.
    I have removed the video skining , which means no buttons so that it is less complicated .

Maybe you are looking for

  • Automatically restart messages stuck in smq2

    Hi, I am having a problem that messages are getting stuck in the inbound queue and I need to manually restart it. I have searched on this and have found that RSQIWKEX job can be used for this. I have tried testing it but the messages are still stuck

  • Need Help with safari for Windows 8

    i am stuck with the need to have a pc due to a proprietary business software... I am a mac user and prefer to use safari... i just had to by a new pc and tried to download safari for windows 8.1 but cannot find it... any help out there?

  • White lines in Firefox on new 27 iMac with 10.6.2

    I get white lines on images being displayed in firefox. These are high resolution images from searching google images. I did not have any trouble on my 20 inch imac with 10.5. I can use Command + Shft + 4 to take a snapshot and the white lines are re

  • System status field  table name

    Dear all, I required help from all of you for finding the table  name for system status of equipment Thanks Raghav

  • HT5815 Screen flicker started after supplemental update to 10.8 5 on my 2012 mac mini

    The problem monitor was one of 2 Dell S2740L and is connected via a mini DP to HDMI cable The 10.8.5 supplemental update came with the iTunes 11.1.1 update The screen would soften and flicker every few seconds and sometimes black out Tried lots of fi