Draw a rectangle in a graph

Hi, I want to programmatically draw a rectangle on a chart XY (XY Graph.vi Build). I know where the 4 points are on the coordinate chart but I can't yet draw using the block Rectangle to draw. Could you please help me how can I draw a rectangle in a graph. I am attaching the photo to this message

Hi guys,.

I thought it was interesting questions - and, although I had not tried anything quite like this before, I thought I would give it a whirl. smercurio_fcsuggestion was excellent - I find the code referenced in LV example finder, in the fundermentals > graphics & graphics > plot pictures folder.

Attached are 2 pieces of code.

DrawRectangle on Graph.vi allows users to define the rectangle by cluster of façade.

DrawRectangle on graphic .vi (events) allows the user to define the rectangle by clicking and dragging on the chart. Please note that the code requires that you start from the upper left corner of the rectangle, and drag to the lower right. But isn't that a creative logic would not solve - if you wanted a bit more flexible code.

You should also know that I have not spent a lot of time on the code, so it is not perfectly architected. But we need to think!

Best wishes

Tags: NI Software

Similar Questions

  • Draw the rectangle to the intensity chart (position where clicked)

    I am able to extract the coordinates using the mouse down and mouse to the top of the structure of the event, but unable to draw the rectangle at the specified position. I get the coordinates to the mouse down and mouse up to the event within these limits. I want to draw a rectangle in the position coordinates, but unable to do so.

    One last thing, since you use the Rectangle to draw, you need to deal with cases where the rectangle is not drawn from top left to bottom right. Please make sure that the minimum value X goes to the entrance on the LEFT and the minimum value of go at the TOP of the terminal of the vi entrance Rectangle rect. Use the Max & Min function from the palette of comparison for that.

    Ben64

  • Third-party tool to draw the rectangle on the block diagram

    I know he was once a third party tool that allowed me to draw a rectangle of Nice double border on the block diagram.  Yes, it's the not the front panel block diagram.  It was very useful to make annotations and designating functional groups.  Does anyone know what this could be?  I installed Package VI Manager and went through everything I can think of without finding her.

    Unfortunately, the documentation for those modules potentially very useful is poor.  The 'Get info' is terse point of unnecessary and by clicking on "Product Home Page" rarely gets you more than a logo, not informative.  Surely there should be more details somewhere.

    I don't know what you're referring to the tool. What is this logo? Maybe someone can recognize.

    What is the problem with the flat frame?

  • Draw text on the XY graph

    Hello

    There is a technique to draw a text note on graph XY.

    For example the text "AAAAAA" put near the upper left of the XY graph.

    Thank you.

    Previous version is wrong: this only works if an annotation already exists on the chart.

    If no annotation it does not work.

    Here is the solution for the empty graph:

  • Why drag the magnifying glass to draw a rectangle in Illustrator CC 2015 no longer works?

    I'm used to be able to draw a rectangle using the class Magnifier to zoom in on a specific area. This doesn't seem to work more after I upgraded to Illustrator CC 2015. Does anyone have an answer as to why? Thank you.

    You will need to disable the Zoom in the preferences of GPU.

  • Why not a draw a rectangle in perspective?

    Hello

    I use Illustrator CC (version 2015.0.0).  I read Adobe Illustrator CC Classroom in a Book (release of 2014) and trying to follow the exercises in each chapter.  I'm up to Chapter 12, which covers the perspective drawing.  I'm at the point where I've set up my perspective grid, and I used the Widget of switching airplane choose I want to attract on 'grid left (1).  I find it strange that when I hover over the 'left grid (1)' in terms of switching Widget, that shows the pop-up note "l: 0;" "H: 0.

    In any case, I selected the rectangle tool and I want to draw a rectangle on the left grid, but I can't do it.  With the rectangle tool selected, when I move the slider on the left grid (or any part of my drawing by the way), the cursor looks like a pencil and just below and to the right of the pencil is a circle with a line through it 45 degrees (the typical symbol you see to make you aware that you can not or should not do something).

    If anyone can give me a clue as to what I might get hurt, I would be very happy.

    Thanks in advance,
    Paul

    Check the Panel layer if the layer is locked.

    If this does not help, please show a screenshot.

  • How can I draw a rectangle?

    I need to simulate a drawing of a rectangle with the Rectangle tool in a script. One way is to use the earpiece of Script and modify the code, so I can pass the necessary variables. Is there a better solution? Thank you.

    You can draw a rectangle as follows.

    #target photoshop;
    app.bringToFront();
    
    main();
    function main(){
    try{
    app.displayDialogs = DialogModes.NO;
    var strtRulerUnits = app.preferences.rulerUnits;
    var strtTypeUnits = app.preferences.typeUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    app.preferences.typeUnits = TypeUnits.PIXELS;
    var Colour = new SolidColor;
    Colour.rgb.hexValue = 'ff00ff';
    app.documents.add();
    activeDocument.selection.select([[10, 10], [494, 10], [494, 350], [10,350]], SelectionType.REPLACE, 0, false);
    activeDocument.selection.stroke (Colour, 4, StrokeLocation.INSIDE,ColorBlendMode.NORMAL,100);
    activeDocument.selection.deselect();
    }catch(e){}
    finally{
    app.preferences.rulerUnits = strtRulerUnits;
    app.preferences.typeUnits = strtTypeUnits;
    };
    };
    
  • How to draw a rectangle empty?

    How to draw a rectangle empty?

    I tried to create a title and use the rectangle tool. However, it doesn't let me do an empty rectangle... only a solid. Help please!

    Turn off the fill, select a feature, select the stroke color.

  • How to draw a rectangle with a border change according to a border image?

    Hi, I already walk image on a photo. Now I want to draw a rectangle at the end of the walk, but the border of the rectangle and border on foot to meet another eact perfectly.

    example image I gave below (downloaded from the internet). I want to fix this rectangle at the end of the foot.

    Thanks in advance

    https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcQRMYcCcxX5sC9jv8AUS64LSfb8I7K6GSsKCsCrUCOE1tbQ6f-Phttps://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRSj_yAwQWXik-xB-spAi9gZwUSgz6JkPCgpGmdajCrY0h6P0hGnw

    Nice day!

    Could you please post a screenshot with the Panel visible layers?

    Is the iten by chance one layer shape and therefore does not have a vector mask?

    Kind regards

    Pfaffenbichler

  • How to draw a rectangle so that she understands a rectangle rotated?

    Did I miss an easy way to draw a rectangle around a rotated object?

    The following code gives me the interim result in the illustration below, but I want the blue rectangle instead.

    var w:uint      = image.width * image.scaleX;
    var h:uint      = image.height * image.scaleY;
    
    canvas.graphics.clear();canvas.graphics.beginFill(0xff0000, .6);
    canvas.graphics.drawRect(image.x, image.y, w, h);
    

    I thought that maybe do an image.right - image.left might work, but I can't seem to figure out how to get to work. How would I want draw the blue rectangle?  Thank you!

    rotated-example.jpg

    If you rotate an object, I think its transform.pixelBounds

    change.

  • Draw a rectangle from a flex application

    Hello

    GRAND CHALLENGE (should be ' hello world ' everyone should easily find):

    (1) - application flex with a button
    (2) - when you click on the draw the rectangle button

    WORK NO PROPOSED SOLUTION:

    Draw.MXML:

    """
    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "absolute" >
    < mx:Script > import DrawApp; < / mx:Script >
    < mx:Script >
    <! [CDATA]
    function drawNow (): void {}
    var myRectangle:DrawApp = new DrawApp();
    myCanvas.addChild (myRectangle.returnRectangle ());
    }
    []] >
    < / mx:Script >
    < mx:Canvas width = "100%" height = "100%" id = "myCanvas" > < / mx:Canvas >
    < mx:Button label = "draw" click = "drawNow ()" > < / mx:Button >
    < / mx:Application >
    """
    DrawApp.as:
    """
    ActionScript file

    package {}

    import flash.display. *;

    class DrawApp extends Sprite
    {
    public void DrawApp()
    {
    do not use the constructor more since it returns the rectangle
    }
    public function returnRectangle (): shape
    {
    var rectAndCircle:Shape = new Shape();
    rectAndCircle.graphics.lineStyle (1);
    rectAndCircle.graphics.beginFill(0x0000FF,1);
    rectAndCircle.graphics.drawRect (125,0,550,575);
    rectAndCircle.graphics.endFill ();
    Return rectAndCircle;
    }
    } //class

    } //package
    """
    I got an error '1034' (BTW bonus if anyone knows how I can avoid having AS3 localized error messages so that I can paste in English full error messages)

    CHALLENGE:
    Can someone show me how to do this wok before Silverlight2 Beta come out?

    Thanks to François who is crazy to try to solve this problem "should be obvious Hello World" for too long, and who also discovered recently:
    -l' lack of discussions in AS3
    -crazy security around Flash Player policy (must set up a proxy to access a public API...)
    -etc.

    Help please Oo

    OK found the solution: you need to change the subject of 'Shape' by a 'UIComponent' object (don't know why).

  • can't draw a rectangle!

    I had 8 fireworks for more than a year, and the other day started this problem: I can't draw a rectangle with sharp corners.

    I select the normal rectangle tool, not the rounded corners. As I drag my mouse to make the rectangle, the value of the rounded corners begins counting upward and usually ends at 100 until I finished the drawing rectangle. If I draw the rectangle very quickly, I'll end with a value of 83 or something.

    I work around this problem by resetting the value of corners rounded to 0 each time. I can still work, but it's a pain to reset to 0 every time that I try to draw a rectangle.

    Anyone know how to fix?

    You hold the arrow keys while dragging the rectangle?

    dgtjce wrote:
    > I had 8 fireworks for more than a year and the other day this problem
    > started: I can't draw a rectangle with sharp corners.
    >
    > I select the normal rectangle tool, not the rounded corners. As I have
    > my mouse to make the rectangle, the rounded value starts to count
    > maximum and him more often close to 100 until I finished the drawing rectangle. If I pull the
    > rectangle very quickly, I'll end with a value of 83 or something.
    >
    > I work around this problem by resetting the value of corners rounded to 0 each
    > times. I can still work, but it's a pain to reset to 0 every time that I try to draw a
    > box.
    >
    > Is - anyone know how to fix?
    >

  • Draw 2 lines in a graph

    Is it possible to draw two lines in a single chart using Grapher? If so, how? If no, then how I can draw two lines or more?

    Yes, click on the sign in lower left to add another equation.

  • How to draw 2 tables on a graph?

    In fact, I'm trying to draw 2 tables the mathscript node .one depends on the other. I did a cluster for the 2 bays and led to plot in the chart, but the chart doesn't really show the exact values.

    I want to draw pde_sim which depends on the snrdb.

    the figure resulted that I get is:

    Is something wrong with my code?

    See duplicate:

    http://forums.NI.com/T5/LabVIEW-MathScript-RT-module/how-to-plot-2-arrays-on-a-graph-in-LabVIEW-Comm...

  • AS3 drawing a rectangle with rounded corners and squares?

    Is this possible in AS3 for a rectangle with square and round corners? I'm drawing a square, which has rounded edges on the top right and bottom left and square corners for those remaining. How can I do? Right now, I have this:

    var g:Graphics = indicator.graphics;

    g.clear ();

    g.beginFill (0 x 512033);

    g.drawRoundRect (x, y, itemRenderer.width, height - 3, 20);

    g.endFill ();

    Many thanks for any help with this!

    You are welcome.

    If you are able, please mark this thread as answered.

Maybe you are looking for

  • How can I delete a bookmark to an iPad?

    How can I delete a bookmark to an iPad without a connected keyboard?

  • Satellite P200 - 14: nothing on the screen when the power

    Hello I have Satellite P200 - 14 h, and a few days ago I started having a problem power on my lap.I press the power button / stop, all three LEDs light up, battery, power supply and the first that shows that the adapter is plugged. Now my problem is

  • Re: Satellite M70-131 - RAM and CPU upgrade

    Hello, I have 2 questions:1 is it possible to install more then 2048 MB RAM in M70 - 131. If someone tried this?2. is it possible to install the new processor of M70 - 131? Now, i've got Pentium M (750) 1, 86GHz (Dothan, 533 MHz). Can I install for e

  • Need the document of the user for my Satellite L645 manuals

    Hello I need user´s manual for my laptop.I bought it in Asia, but unfortunately I n t have manuals for it.I ve it searched already on the toshiba page but I'm not. Who can help me?My laptop model is Satellite L645.Thanks in advance + The message was

  • Error code 80070490. Standard solutions do not work.

    I use Windows Vista Home Premium 32 - bit edition with Service Pack 1.  His ability to perform automatic and manual, updates have not completely.  When I try to update, it tells me that I need what is called a system update tool.  The Download Center