Thickness of the plot

Hi all

I am doing a project in LabWindows/CVI, where I have to post 16 tracks.

I did it with a StripChart, but I had to reboot with graphic, because I wanted to use the zoom feature.

Now, I can show my 16 tracks on the chart, but I have a problem with SetPlotAttribute. Here are some of my code (Simplified):

for (int k = 0; k)<16 ;="">

Plot (panelHandle, PANEL_GRAPH, time, k + 1, time + delaiCommande [i], k + 1, VAL_GREEN);
SetPlotAttribute (panelHandle, PANEL_GRAPH, intrigue, ATTR_LINE_STYLE, VAL_SOLID);
SetPlotAttribute (panelHandle, PANEL_GRAPH, plot, ATTR_PLOT_THICKNESS, 4);

}

It compiles, but it crashes. I warnings: "incompatible pointer to integer conversion from ' int (int, int, double, double, double, double, int) __attribute__ ((stdcall))' to 'int' type parameter»

I'm sure that's no big deal, but I don't really know what to do now...

Thanks for any help!

Kind regards

jerome_gab.

Plot returns a handle thet you use during subsequent calls to set the attributes of the plot:

for(int k=0 ; k<16 ; k++){
        plotH = PlotLine (panelHandle, PANEL_GRAPH, tempsEcoule, k+1, tempsEcoule+delaiCommande[i], k+1, VAL_GREEN);
        SetPlotAttribute (panelHandle, PANEL_GRAPH, plotH, ATTR_LINE_STYLE, VAL_SOLID);
        SetPlotAttribute (panelHandle, PANEL_GRAPH, plotH, ATTR_PLOT_THICKNESS, 4);
}

You use a function instead, definition where the error you get.

Tags: NI Software

Similar Questions

  • graphical annotation target WPF is hidden under the plot

    Target of annotation is hidden under the ground and cannot interact with. Annotation label is positioned on the same parcel and is draggable. No plot, everything works fine. When I zoom sufficient for this plot is not too thick, it also works very well. See the attachment, it a circle of barely visible annotation under the plot, and it cannot be moved. If I click on the part of the circle that is not covered by the plot, it can be moved.

    Measurement Studio 2013, VS 2010, 64-bit Windows 8

    It is an attached property that is defined by the base class LayeredGraph . In code, you would use Graph.SetPosition( annotation, GraphLayerPosition.AbovePlots ) ; in XAML, ni:Graph.Position="AbovePlots" .

  • Align WPF elements with the plot area

    Is there a recommended way to align WPF elements outside the graph with the plot area? I like my UI align the left edge of area of land. Another use case is lining up outside elements with a RangeCursor.

    The way we do now is to add a canvas as a child of the graph. The canvas contains a hidden Visual position ourselves with Canvas.SetLeft using values calculated from the graph margin and padding. Then, we call PointToScreen (new Point (0,0)) on the display. It works most of the time, but the position of the Visual sort of trolling the real edge graphic when the y-axis range changes (and a few other changes axis, that I've not completely nailed down). By calling UpdateLayout on the display when the range changes, I can make it work most of the time, but when I do that, I find that I spend a lot of time CPU in the user interface thread to this appeal.

    Currently, the graph does not directly expose the offset of the plot area in the border of the control. Your method of using a nested Visual to calculate the offset appears as a reasonable approach with the current API. I created a quick mock-up using this approach for certain forms of referring to the plot area and a range slider:

    XAML
        
            
                
                
                
            
            
                
                
                
            

    LayoutUpdated="OnGraphLayoutUpdated">
                
                    
                    
                
                
                    
                    
                
            


            
            
            
        

    Code
        public partial class MainWindow : Window {
            private static readonly Range RelativeRange = new Range( 0.0, 1.0 );

    public MainWindow( ) {
                InitializeComponent( );

    rangeCursor.HorizontalAxis = xAxis;
                rangeCursor.VerticalAxis = yAxis;
            }

    private void OnGraphLayoutUpdated( object sender, EventArgs e ) {
                UpdateAlignment( );
            }

    private void UpdateAlignment( ) {
                Size size = graph.RenderSize;
                if( size.Width <= 0.0 || size.Height <= 0.0 )
                    return;

    // Get reference point to canvas in bottom-left corner of graph.
                var referenceTransform = referenceVisual.TransformToVisual( graph );
                Point graphBottomLeft = referenceTransform.Transform( new Point( ) );

    // Apply margin to size and bottom-left reference point.
                Thickness margin = graph.Margin;
                size.Width += margin.Left + margin.Right;
                size.Height += margin.Top + margin.Bottom;
                graphBottomLeft.X += margin.Left;
                graphBottomLeft.Y += margin.Top;

    // Calculate top-right reference point.
                Size plotAreaSize = graph.GetPlotAreaSize( );
                Point graphTopRight = new Point(
                    graphBottomLeft.X + plotAreaSize.Width,
                    graphBottomLeft.Y - plotAreaSize.Height );

    // Get reference points for range cursor within plot area.
                var horizontalRange = rangeCursor.GetRelativeHorizontalRange( ) ?? RelativeRange;
                var verticalRange = rangeCursor.GetRelativeVerticalRange( ) ?? RelativeRange;
                Point cursorBottomLeft = graph.RelativeToScreen( new Point( horizontalRange.Minimum, verticalRange.Minimum ) );
                Point cursorTopRight = graph.RelativeToScreen( new Point( horizontalRange.Maximum, verticalRange.Maximum ) );
                cursorBottomLeft.X += graphBottomLeft.X;
                cursorBottomLeft.Y += graphTopRight.Y;
                cursorTopRight.X += graphBottomLeft.X;
                cursorTopRight.Y += graphTopRight.Y;

    // Set margin to align graph and cursor visuals.
                graphTopRectangle.Margin = new Thickness { Left = graphBottomLeft.X, Right = size.Width - graphTopRight.X };
                graphLeftRectangle.Margin = new Thickness { Top = graphTopRight.Y, Bottom = size.Height - graphBottomLeft.Y };
                cursorBottomRectangle.Margin = new Thickness { Left = cursorBottomLeft.X, Right = size.Width - cursorTopRight.X };
                cursorRightRectangle.Margin = new Thickness { Top = cursorTopRight.Y, Bottom = size.Height - cursorBottomLeft.Y };
            }
        }

  • HP OfficeJet 3830: Printer HP Office Jet 3830 print labels? I can't find any option to change the thickness of the p.

    I need to print labels, sometimes one and sometimes pages of them.  When I put a sheet of labels in the Office Jet 3830 (in Word 16) the stuck sheet and would not go through the printer.  I can't find any way to adjust the thickness of the paper, not something thick like a page of blank labels.  If the printer has this function, how can I activate it?

    @vjdetling

    Printer:

    Range of all-in-one printers, HP OfficeJet 3830

    Full software features:

    File name: OJ3830_72.exe

    The specificationsindicate that the printer software can handle one type of media (paper type), titled "letter of card Index".

    Set your printing preferences / Print Preview to include

    • Media type 'Index Card letter'
    • Paper size: letter

    If includes it the list of media type, you can also try 'Matte of the Brochure' (wording varies)

    Help, suggestions and examples:

    Print Labels_Business-Cards_Cards

    When you see a post that will help you,

    Who inspires you, gives a cool idea,

    Or you learn something new.

    Click the 'Thumbs Up' on this post.

    Fixed / responded? Click this post accept as Solution to help others find answers.

  • IPad pro cable loading safely able to charge phone more than 6 s.  I noticed that it is thicker than the iPhone cable

    MY pro iPad charging cable is thicker than the iPhone cable loading.  It will damage phone if I used it to charge the phone

    the thickness of the cable have no impact on the load so not

  • "print" command in Mathscript recording is not the plots in BMP format!

    Hi guys,.

    I am creating a vi that automatically generates a pdf for my project report. I found a way to record the report directly in pdf format (in other words, I have 'print' my report to a (PDFCreator) Virtual PDF printer that saves the file in a specific folder with the date/time under his name.) "So, this was the first step to make the automatic procedure).

    I'm stuck in the next step, which is adding to the report no graphics bad appearance of labview, but the plots of the victims of the Mathscript.

    Yes, after you have added as input 'a' my data to the mathscript node, I use the following commands:

    Figure

    Plot (a)

    print the image

    Now, what is this sequence is to do a beautiful land of my data and then save it as "image.eps" in the default folder.

    However, the eps format is not at all useful to me because I can't import the plot with the 'Add Image to Report.vi '. This vi supports the formats BMP, GIF, WMF, EMF and JPG only.

    So, I want to save as BMP mathscript plot. It's supposed to be possible, but I have not been able to find a way. Using the command 'Print' for Labview Mathscript 2011 reads as follows:

    http://zone.NI.com/reference/en-XX/help/373123B-01/lvtextmath/msfunc_print/

    Syntax


    print

    Print (a)

    Print (file)

    printing (, file)

    Description


    Print the trace window, or save it in a file in BMP or EPS format. If the trace to save window is a plot of the image or a 3D terrain, the file must be in BMP format. Other types of plots, formats BMP and EPS are supported.

    There is no way for me to choose what format I want, and it automatically selects the eps. If I use the command

    print image.bmp

    It gives me an error. So adding the endpoint .bmp is not the way to go.

    Overall, it is essential for me to export the plot in BMP format (in order to import it into the generation of report), but I can't find a way, althouth it is supposed to work.

    Any ideas?

    Thank you

    PS. I run Labview 2011 SP1

    Hello

    You must use the following command

    Print ('test.bmp')

    Instead of

    print test.bmp

  • Legend of the plot does not update?

    My legend of conspiracy will not show the new names I'm wiring. It displays the default plot 0, track 1, and so on, rather than the column headers it is supposed to read the data file.

    Any ideas? See the attached VI and the associated text file that I am trying to trace.

    In the example you have validated, your table for the colors of the plot is empty if the because the loop will not run.

  • How to force a refresh of the plot

    I'm trying to load some data from a text file and it draw 2 different contour (3d surface plots).  Inevitably, the first time that I load the file after that I open the VI, crass conspiracy does not refresh.  However, the plot very well done.  I don't know if it's a matter of timing of the completion of all the data of the file loading, or what.  I tried to re-wiring son error to force the sequence and tried sequential structures.  Nothing seems to work and I can't find a control for me to force him to cool off.  Anyone know what could be going on here?  I have included the 2 required VI and an example of text file.  Can someone help me out here?

    Thank you

    Chris

    Hi Chris,

    I ran your code with the enforcement tool point high (light bulb next to the pause button in the run menu - sorry if I've just insulted your intelligence, but not sure about your experience with LabVIEW). I noticed that the variables local just outside the structure of sequence would first update with values 0.0 then the code could perform the function of file as well as the previous code dialog box this feature. Given that local variables were called first in LabVIEW and updated with zeros as opposed to data acquired from your text file, the result is a track of course empty.

    When you run the code a second time, locals have since been updated with the correct values, which is why you get the plot.

    I have attached a screenshot and a .vi of my suggestions for what you can do to ensure the update of these local variables at the appropriate time and allow the data to chart at the interpolation of course in the first run. I hope that this solves your problem. If this isn't the case, please let me know.

    Also, I will take a lot of heat from other programmers out there if I did not at least mention that using multiple local variables throughout your .vi can be problematic in the sense that it can be difficult to properly manage the data flow and can lead to the frustration of troubleshooting. There are certainly better alternatives, but I thought you'd rather have a quick solution for now and worry not about cleaning up the code later.

    Hope this helps,

    Cory

  • Can I detect a change of name of plot event in a legend of the plot?

    I want to update a configuration file, if a user changes the name of a conspiracy in the plot legend.

    Events, I see plots are: value change, the change of range autoscale, plot attribute change and change of range of scale.

    Change of attribute plot doesn't seem to understand anything like on behalf of the parcel, and others obviously do not contain this info either.

    Is it possible to recover this event?

    Thank you.

    Jordan

    First of all, remember that there is no simple way to encode anything, so I can offer a possible solution for you, but it certainly isn't the only one.

    LabVIEW has no property to check if the name has been changed through a structure of the event, but you can create your own LabVIEW can read events. I found this really good which may help you. Read this and mess around with it and see if it gets you anywhere: Creation of user events

    Once you get to trigger the appropriate, then its just get this deal to update the file you want.

    Another possible workaround solution that isn't ideal, is to create a chain control and who have to be on top of the name of the parcel. You would be able to produce then an event in this chain, change the value.

    I hope this helps.

  • Rotate the Plot chart legend of XY

    Is it possible to rotate the legend of the plot for the plot names letters run from the bottom to the top rather than in the whole of the operator interface?

    The names of my plots are bigger and I need to show at least four plots at the same time. Put the scales to the right/left/above or below without rotating can cause a short XY Chart!

    Any ideas for me?

    Concerning

    Waris K

    Hello

    I don't know if there is a native way to do it, but you can 'cheat' to do this:

    You can move the table where the captions are, or even make the table turn into lines instead of the column.

    Is the idea ok for you?

  • Change the thickness of the main grid

    I use the xy graph and I need to change the thickness of the main grid (thicken)

    How can I change the thickness of the main gridlines?

    You cannot change the thickness.  Change the color to the place if the grid is less noticeable or more noticeable.

  • How to choose the color marker in the plot of the intensity

    Hello

    I am tracing my 2D data file in the plot of the intensity. I want to that path of color should be as red as value maximum all in green as minimum value and 0 must be yellow. I watched this http://digital.ni.com/public.nsf/allkb/1ADFF221E27F5B5886256E6F007C7B58?OpenDocument example, but in this example they decide marker beforehand. In my case, I want to choose marker based on maximum and minimum value.

    Thank you

    Yogesh

    Here's a simple example. I didn't change anything execpt for show with 1 decimal digit z scale markers (default is zero). It is just cosmetic.

  • How to remove a parcel and resize the legend of the plot in LV 8.6 as in this link to an example 7.0 LV

    This VI (ftp://ftp.ni.com/pub/devzone/epd/201150.vi) works exactly as I want to apply for a 8.6 at-, but the property node used in the example is no longer supported.

    I can add/remove sites and resize the legend of the plot with 8.6 using the 'LegNumRows' property, but this property does not behave in the same way.

    It seems like it should be simple, but I must be missing something.

    Thank you to confirm that this property does not work in the same way as in the example when it is used with a XY graph clusters and no dynamic data.

    I left the property node in the structure of the case (just as it was in the original example) while not to jam too when you went to compare two examples - my application does not for the reasons you stated.

    I will implement a legend Manager to ensure the follow-up of the plots in the legend.

    Thanks for the validation test!

  • the names of the plots on the chart and use these channels in the menu of the ring

    Hello everyone!

    I table 1 d which is more a cluster of 2 elements: one is a number and other string. These string contains the information on the name of signals. I connected this table 1 d to reshape the array with a dimension of 10.  Then the consistent table is connected to the table in the cluster. This cluster has led is still naked to get the name of the plots. The problem is that I don't want these 9 unbundle blocks to get the name of the plots. Is there anyway I can do it without use of unbundling 9 times. I though that the use of loop for or while loop, but I need some suggestions.

    So I have two questions:

    How to get the name of plots is without using unbundle so many times?

    Second is how to display the names of these plots on my menu ring?

    I must have missed something, I didn't see any large cluster on your drawing. Change this large cluster in a table, because there a lot of the same element. Then proceed as attaché.

  • lable of the plot

    Hello

    I use hp4192A impedance Analyzer to run two measures: CV and see after taking data, CV or CF plot appears in the front panel. Is there a way to show different plots label according to how I run? by example, if I run as CV, the plot will show the lable as ' C (F) vs V (V)' and vice versa. "

    Thank you

    Joyce

    Like this.

Maybe you are looking for