How to crate a graph?
Hi All,
I have two text fields for X and Y values By giving values need to show a corresponding graph to that values in below.
How can i pudate a question text. Pl give me a Sample pl
1. This depends a lot on what kind of graph you are
making. A pie chart and
a bar diagram is quite easy to do just by painting. A
scatter diagram is more
complex, since in java coordinates start from upper
left corner and in scatter
diagram they start from bottom left corner, hence you
have to reverse the y
values. I've done this type of thing once, it's
actually quite easy once you get
the hang of it. There are also some ready made
libraries for this, just google
around for them.
2. No, you don't have to create a new frame. Just
update the question text.
kari-matti
Similar Messages
-
How to get bar graph in word in labwindow/CVI ?
how to get bar graph in word in labwindow/CVI ?
ashwinic9,
spawning your question over more and more threads (the present one, this one and this other one) won't give you a faster answer; instead, it will irritate forum users!
Especially if you have at your disposal a fast way to perform a test. I pointed you some days ago to word report example, that writes a table to a word document: did you tried changing the graph into a bar graph and generating the report? I have done it for you and the result is OK, as you can see in the attached document.
Now, since the example works well, there must be something in your particular situation that prevents the graph to be shown; that is: you must add some more data on your actual problem and maybe a small example that exposes the problem.
But please: keep active only this discussion and let the other threads die!
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?
Attachments:
wordreport.doc 38 KB -
How to crate new user in adf security using jspx page
how to crate new user in adf security using code in java file.plz help me this work will submited to day plz help me...
sigh
Search really would help and point you in the right direction. You'd find [url http://forums.oracle.com/forums/thread.jspa?messageID=4584464]this, for example. -
How to Draw a graph Using layout In a module pool Program
Hello Friends
How to Represent a Graph in the layout in a module pool program.
Plz suggest me.
Thanking you all
lavanyaTHIS IS AN EXAMPLE PROGRAM FOR GRAPHICS.
Run this program & see whether it will be useful for u or not.
before running dont forget to set the pf status.
after copying double click the pf status & in application tool bar. give function code like this.
PF07 - for 2d graph.
PF06 - for 3d
PF05 - for 4d
DATA: BEGIN OF DATA OCCURS 1,
P TYPE P,
END OF DATA.
--- options-table -
DATA: BEGIN OF OPTS OCCURS 1,
C(80) TYPE C,
END OF OPTS.
DATA: BEGIN OF TDIM1 OCCURS 1,
C(80) TYPE C,
END OF TDIM1.
DATA: BEGIN OF TDIM2 OCCURS 1,
C(80) TYPE C,
END OF TDIM2.
DATA: BEGIN OF TDIM3 OCCURS 1,
C(80) TYPE C,
END OF TDIM3.
DATA: BEGIN OF MAX OCCURS 1,
D1(3) TYPE P VALUE 4,
D2(3) TYPE P VALUE 5,
D3(3) TYPE P VALUE 6,
END OF MAX.
DATA: TYEAR1(5) VALUE '#1991',
TYEAR2(5) VALUE '#1992',
TYEAR3(5) VALUE '#1993',
TYEAR4(5) VALUE '#1994'.
DATA: TPROD1(9),
TPROD2(9),
TPROD3(9),
TPROD4(9),
TPROD5(9).
TPROD1 = TEXT-P01.
TPROD2 = TEXT-P02.
TPROD3 = TEXT-P03.
TPROD4 = TEXT-P04.
TPROD5 = TEXT-P05.
DATA: TLAND1(20),
TLAND2(20),
TLAND3(20),
TLAND4(20),
TLAND5(20),
TLAND6(20).
TLAND1 = TEXT-L01.
TLAND2 = TEXT-L02.
TLAND3 = TEXT-L03.
TLAND4 = TEXT-L04.
TLAND5 = TEXT-L05.
TLAND6 = TEXT-L06.
DATA: INDEX LIKE SY-INDEX.
DATA: MAXD(3) TYPE P.
DATA: TYP.
FIELD-SYMBOLS: <F>.
SET PF-STATUS 'GRAF'.
PERFORM FILL_DATA.
MAXD = MAX-D1 * MAX-D2.
*{listdisplay
display of a list: *
for 5 countries each 4 colums (years) and 5 lines (products)
WRITE: / TLAND1.
INDEX = 1.
PERFORM LISTE.
SKIP.
ULINE.
WRITE: / TLAND2.
INDEX = MAXD + 1.
PERFORM LISTE.
NEW-PAGE.
WRITE: / TLAND3.
INDEX = 2 * MAXD + 1.
PERFORM LISTE.
SKIP.
ULINE.
WRITE: / TLAND4.
INDEX = 3 * MAXD + 1.
PERFORM LISTE.
NEW-PAGE.
WRITE: / TLAND5.
INDEX = 4 * MAXD + 1.
PERFORM LISTE.
SKIP.
ULINE.
WRITE: / TLAND6.
INDEX = 5 * MAXD + 1.
PERFORM LISTE.
PF05: 4D-graphic, general function-module *
AT PF05.
REFRESH OPTS.
--- first screen: selection -
WRITE 'FIFRST = PU' TO OPTS-C. APPEND OPTS.
--- 2D-graphic-type: perspective bars -
WRITE 'P2TYPE = TD' TO OPTS-C. APPEND OPTS.
--- kind of colours: regular -
WRITE 'P3CTYP = PL' TO OPTS-C. APPEND OPTS.
*--- dimension 1
REFRESH TDIM1.
MOVE TYEAR1 TO TDIM1.
APPEND TDIM1.
MOVE TYEAR2 TO TDIM1.
APPEND TDIM1.
MOVE SPACE TO TDIM1.
APPEND TDIM1.
MOVE TYEAR4 TO TDIM1.
APPEND TDIM1.
*--- dimension 2
REFRESH TDIM2.
MOVE SPACE TO TDIM2.
APPEND TDIM2.
MOVE TPROD2 TO TDIM2.
APPEND TDIM2.
MOVE TPROD3 TO TDIM2.
APPEND TDIM2.
MOVE TPROD4 TO TDIM2.
APPEND TDIM2.
MOVE SPACE TO TDIM2.
APPEND TDIM2.
*--- dimension 3
REFRESH TDIM3.
MOVE TLAND1 TO TDIM3.
APPEND TDIM3.
MOVE SPACE TO TDIM3.
APPEND TDIM3.
MOVE TLAND3 TO TDIM3.
APPEND TDIM3.
MOVE TLAND4 TO TDIM3.
APPEND TDIM3.
MOVE SPACE TO TDIM3.
APPEND TDIM3.
MOVE SPACE TO TDIM3.
APPEND TDIM3.
CALL FUNCTION 'GRAPH_MATRIX'
EXPORTING
TITL = TEXT-VGL
VALT = 'DM'
DIM1 = TEXT-J00
DIM2 = TEXT-P00
DIM3 = TEXT-L00
TABLES
DATA = DATA
TDIM1 = TDIM1
TDIM2 = TDIM2
TDIM3 = TDIM3
OPTS = OPTS.
PF06: 3D-graphic general function-module *
AT PF06.
REFRESH OPTS.
--- first screen: selection -
WRITE 'FIFRST = PU' TO OPTS-C. APPEND OPTS.
--- 2D-graphic-Type: perspective bars -
WRITE 'P2TYPE = TD' TO OPTS-C. APPEND OPTS.
--- kind of colours: regular -
WRITE 'P3CTYP = PL' TO OPTS-C. APPEND OPTS.
*--- dimension 1
REFRESH TDIM1.
MOVE TYEAR1 TO TDIM1.
APPEND TDIM1.
MOVE SPACE TO TDIM1.
APPEND TDIM1.
MOVE TYEAR3 TO TDIM1.
APPEND TDIM1.
MOVE TYEAR4 TO TDIM1.
APPEND TDIM1.
*--- dimension 2
REFRESH TDIM2.
MOVE TPROD1 TO TDIM2.
APPEND TDIM2.
MOVE SPACE TO TDIM2.
APPEND TDIM2.
MOVE TPROD3 TO TDIM2.
APPEND TDIM2.
MOVE SPACE TO TDIM2.
APPEND TDIM2.
MOVE TPROD5 TO TDIM2.
APPEND TDIM2.
REFRESH TDIM3.
CALL FUNCTION 'GRAPH_MATRIX'
EXPORTING
TITL = TEXT-VGL
VALT = 'DM'
DIM1 = TEXT-J00
DIM2 = TEXT-P00
TABLES
DATA = DATA
TDIM1 = TDIM1
TDIM2 = TDIM2
TDIM3 = TDIM3
OPTS = OPTS.
PF07: 2D-graphic general function-module *
AT PF07.
REFRESH OPTS.
--- first screen: selection -
WRITE 'FIFRST = PU' TO OPTS-C. APPEND OPTS.
--- 2D-graphic-type perspective bars -
WRITE 'P2TYPE = TD' TO OPTS-C. APPEND OPTS.
--- kind of colour: regular -
WRITE 'P3CTYP = PL' TO OPTS-C. APPEND OPTS.
*--- dimension 1
REFRESH TDIM1.
MOVE TYEAR1 TO TDIM1.
APPEND TDIM1.
MOVE SPACE TO TDIM1.
APPEND TDIM1.
MOVE TYEAR3 TO TDIM1.
APPEND TDIM1.
MOVE TYEAR4 TO TDIM1.
APPEND TDIM1.
REFRESH TDIM2.
REFRESH TDIM3.
CALL FUNCTION 'GRAPH_MATRIX'
EXPORTING
TITL = TEXT-VGL
VALT = 'DM'
DIM1 = TEXT-J00
TABLES
DATA = DATA
TDIM1 = TDIM1
TDIM2 = TDIM2
TDIM3 = TDIM3
OPTS = OPTS.
FORM LISTE *
displays a list with turnover figures *
(products and years) *
FORM LISTE.
DATA: CNT_MOD LIKE SY-TABIX.
DATA: CNT_DIV LIKE SY-TABIX.
WRITE: / TEXT-P00,22 TYEAR1,39 TYEAR2,56 TYEAR3, 73 TYEAR4.
SKIP 2.
DO MAXD TIMES.
READ TABLE DATA INDEX INDEX.
IF SY-SUBRC NE 0. EXIT. ENDIF.
INDEX = INDEX + 1.
CNT_MOD = SY-INDEX MOD MAX-D1.
CNT_DIV = SY-INDEX DIV MAX-D1.
IF CNT_MOD EQ 1.
CASE CNT_DIV.
WHEN 0.
WRITE: / TPROD1, ' '.
WHEN 1.
WRITE: / TPROD2, ' '.
WHEN 2.
WRITE: / TPROD3, ' '.
WHEN 3.
WRITE: / TPROD4, ' '.
WHEN 4.
WRITE: / TPROD5, ' '.
ENDCASE.
ENDIF.
WRITE: DATA-P.
ENDDO.
ENDFORM.
FORM FILL_DATA *
fills the datatable *
FORM FILL_DATA.
DATA-P = 153470.
APPEND DATA.
DATA-P = 243470.
APPEND DATA.
DATA-P = 124567.
APPEND DATA.
DATA-P = 179037.
APPEND DATA.
DATA-P = 234980.
APPEND DATA.
DATA-P = 287513.
APPEND DATA.
DATA-P = 253430.
APPEND DATA.
DATA-P = 223440.
APPEND DATA.
DATA-P = 24567.
APPEND DATA.
DATA-P = 180037.
APPEND DATA.
DATA-P = 129830.
APPEND DATA.
DATA-P = 145530.
APPEND DATA.
DATA-P = 132470.
APPEND DATA.
DATA-P = 453470.
APPEND DATA.
DATA-P = 24456.
APPEND DATA.
DATA-P = 119807.
APPEND DATA.
DATA-P = 288710.
APPEND DATA.
DATA-P = 166656.
APPEND DATA.
DATA-P = 300430.
APPEND DATA.
DATA-P = 723110.
APPEND DATA.
DATA-P = 22767.
APPEND DATA.
DATA-P = 195522.
APPEND DATA.
DATA-P = 38970.
APPEND DATA.
DATA-P = 89635.
APPEND DATA.
DATA-P = 166970.
APPEND DATA.
DATA-P = 401470.
APPEND DATA.
DATA-P = 29967.
APPEND DATA.
DATA-P = 112957.
APPEND DATA.
DATA-P = 37860.
APPEND DATA.
DATA-P = 77450.
APPEND DATA.
DATA-P = 253150.
APPEND DATA.
DATA-P = 343570.
APPEND DATA.
DATA-P = 768867.
APPEND DATA.
DATA-P = 236790.
APPEND DATA.
DATA-P = 122750.
APPEND DATA.
DATA-P = 328760.
APPEND DATA.
DATA-P = 292150.
APPEND DATA.
DATA-P = 356570.
APPEND DATA.
DATA-P = 268867.
APPEND DATA.
DATA-P = 36790.
APPEND DATA.
DATA-P = 125680.
APPEND DATA.
DATA-P = 178893.
APPEND DATA.
DATA-P = 333150.
APPEND DATA.
DATA-P = 373570.
APPEND DATA.
DATA-P = 168867.
APPEND DATA.
DATA-P = 226790.
APPEND DATA.
DATA-P = 278940.
APPEND DATA.
DATA-P = 177784.
APPEND DATA.
DATA-P = 234150.
APPEND DATA.
DATA-P = 296570.
APPEND DATA.
DATA-P = 233867.
APPEND DATA.
DATA-P = 16790.
APPEND DATA.
DATA-P = 125590.
APPEND DATA.
DATA-P = 208760.
APPEND DATA.
DATA-P = 113150.
APPEND DATA.
DATA-P = 388570.
APPEND DATA.
DATA-P = 565867.
APPEND DATA.
DATA-P = 211790.
APPEND DATA.
DATA-P = 277480.
APPEND DATA.
DATA-P = 277489.
APPEND DATA.
DATA-P = 53470.
APPEND DATA.
DATA-P = 321560.
APPEND DATA.
DATA-P = 452456.
APPEND DATA.
DATA-P = 174695.
APPEND DATA.
DATA-P = 277590.
APPEND DATA.
DATA-P = 177490.
APPEND DATA.
DATA-P = 153470.
APPEND DATA.
DATA-P = 467560.
APPEND DATA.
DATA-P = 222456.
APPEND DATA.
DATA-P = 198695.
APPEND DATA.
DATA-P = 99470.
APPEND DATA.
DATA-P = 100340.
APPEND DATA.
DATA-P = 11470.
APPEND DATA.
DATA-P = 323560.
APPEND DATA.
DATA-P = 434456.
APPEND DATA.
DATA-P = 224695.
APPEND DATA.
DATA-P = 277490.
APPEND DATA.
DATA-P = 467890.
APPEND DATA.
DATA-P = 953470.
APPEND DATA.
DATA-P = 67560.
APPEND DATA.
DATA-P = 298456.
APPEND DATA.
DATA-P = 98695.
APPEND DATA.
DATA-P = 577900.
APPEND DATA.
DATA-P = 199490.
APPEND DATA.
DATA-P = 18470.
APPEND DATA.
DATA-P = 390560.
APPEND DATA.
DATA-P = 411456.
APPEND DATA.
DATA-P = 94695.
APPEND DATA.
DATA-P = 182000.
APPEND DATA.
DATA-P = 260570.
APPEND DATA.
DATA-P = 367356.
APPEND DATA.
DATA-P = 231850.
APPEND DATA.
DATA-P = 436645.
APPEND DATA.
DATA-P = 346650.
APPEND DATA.
DATA-P = 82500.
APPEND DATA.
DATA-P = 300560.
APPEND DATA.
DATA-P = 467109.
APPEND DATA.
DATA-P = 161850.
APPEND DATA.
DATA-P = 356470.
APPEND DATA.
DATA-P = 198840.
APPEND DATA.
DATA-P = 199000.
APPEND DATA.
DATA-P = 340570.
APPEND DATA.
DATA-P = 127356.
APPEND DATA.
DATA-P = 591850.
APPEND DATA.
DATA-P = 287460.
APPEND DATA.
DATA-P = 299770.
APPEND DATA.
DATA-P = 12500.
APPEND DATA.
DATA-P = 230560.
APPEND DATA.
DATA-P = 437109.
APPEND DATA.
DATA-P = 191850.
APPEND DATA.
DATA-P = 36780.
APPEND DATA.
DATA-P = 78789.
APPEND DATA.
DATA-P = 282000.
APPEND DATA.
DATA-P = 270570.
APPEND DATA.
DATA-P = 567356.
APPEND DATA.
DATA-P = 31850.
APPEND DATA.
DATA-P = 92410.
APPEND DATA.
DATA-P = 121350.
APPEND DATA.
DATA-P = 67356.
APPEND DATA.
DATA-P = 431891.
APPEND DATA.
ENDFORM. -
How to plot a graph in JSP
Hi!
You can use jfreechart.
It is a good tool and if you search on Google you can find more info and more web examples (files, .war, ...)
Bye. -
How to plot XY graph from 2 input of dynamic array ? ...
I have 2 problem when I plot XY graph with 2 dynamic array :
- I want to make the graph look like sweep chart. But it's seem not possible to use waveform graph?
- The graph shoul move from left to right , then right to left, then left to right,.....
Any one can give me some hints? Thanks alot.
Attachments:
U1.PNG 21 KB
XY radom value input.vi 147 KBI have to make Y change from 0-10, then 10-0,.... Any one can help me to make it better?
- How I shift the graph?
Attachments:
working_increse_decrease.vi 20 KB -
How change the report graph color in teststand
how change the report graph color in teststand?
Michael,
You might also be able to customize the style sheet associated with the report. The TestStand Help provides some information about how to customize ATML or XML style sheets to change report colors based on the status of test steps.
Please take a look at the following topics; are these helpful?
ATML Report Style Sheets
Modifying Cell Background Color Based on Step Status in ATML Test Results 5.0 Reports
XML Report Style Sheets
Modifying Cell Background Color Based on Step Status in XML Reports
Tom
TestStand Documentation -
How to export xy graph with indicator field.
hi,
I want export my graph in .emf format.For this i have used invoke node>>Image export. If i use this , i can only export the graph not other indicator filed(numeric and string indicatror).how can i export graph with indicator field??
here is .vi that i have used.
Solved!
Go to Solution.
Attachments:
Unbenannt 2.vi 12 KBThanks for your post in our Discussion Forum,
is it necessary to export the picture in the .emf Format?
Otherwise I can provide two possibilities:
The easiest way to make a screenshot of a certain area of the frontpanel is to
create a SubVI with all the elements you want to take a screenshot from and
then take a screenshot from the whole frontpanel of the SubVI.
This works fine although the frontpanel is not visible while the picture is taken.
The screenshot can be taken with a method-node as seen in the example attached to this post.
Another possibility is to crop a screenshot of a whole frontpanel to the region which you are interested in.
How this works is described here: http://forums.ni.com/t5/LabVIEW/take-screenshot-of-part-of-front-panel/td-p/1613750
The downside is that you have to manually set the region which might change due to scrolling or changes on the panel.
Best regards,
Peter
Attachments:
VI Screenshot.vi 13 KB -
Thanks John for your answer. Attached file the sample graph what i really want to plot it.Any body can help me.Thanks.
Attachments:
waterfall.gif 81 KBHello asrol,
Please try to post replies under the same thread so that it is easier for everyone to keep track of your issue. Thanks!
Original thread: How to plot waterfall graph in vb6 from offline data
John B.
Applications Engineer
National Instruments -
How to plot waterfall graph in vb6 from offline data
How to plot waterfall graph in vb6 from offline data?The data load from SQL Server Database.Thanks.
asrol,
If you look at the Plot Styles example in the folder I mentioned in the previous post there is a section of code there that you might want to refer to in order to recreate your data.
'=============================================================================
' Plot Curve Button Handler
'=============================================================================
Private Sub PlotCurve_Click()
' Create curve data
Dim x(40)
Dim y(40)
Dim z(40)
For i = 0 To 40
x(i) = Sin(i / 3#)
y(i) = Cos(i / 3#)
z(i) = i
Next i
In this example they create 3 arrays to represent the three dimensions of the array. For your case if you were to plug your data into two of the array (axes) that would give you the data for the channels, then you can simply input a constant for the third array it would produce a single line of your data as shown in your example GIF. You can then repeat this process for each set of data, with a new constant value for that third axis, and it should manually create a graph that will look something like you desire.
John B.
Applications Engineer
National Instruments -
How to draw a graph step by step ?
Hi, sirs,
Can you tell me how to draw a graph step by step by using Labview 6.0 ? On one step, I create two variables : one variable is used for X-axis, and other variable is used for Y-axis. Can you give me a simple example ?
Thanks a lot.Try this example out.
Attachments:
plotxy.vi 24 KB -
How to create statistical graph?
Could any of you give me some suggestion on how to create statistical graph (line)?
Is there any documentation or reference about this?
Thank you so much for your help.I would like to create a chart using swing.
The chart is a line plot and it should be able to be printed.
Could you give me some suggestion?
Thank you very much. -
How to create a graph representing a big tree(parents and children are know
How to create a graph representing a big tree(parents and children are known)?
Thank you so much!
Also, I need to write the graph into a jpg/gif file or display the graph in the web browser.
I got a code from JGraph and can create the graph I want, although unextendable. However, JGraph define the graph as class Gscene instead of Img or BufferedImg or RenderedImg. Therefore, I couldn't use ImageIO.write(image, ext, file) to write the graph into a jpg file.aiGrace wrote:
How to create a graph representing a big tree(parents and children are known)?Hierarchical data structures are covered here all the time. Please search before you post. This topic has been covered over and over.
Thank you so much!
Also, I need to write the graph into a jpg/gif file or display the graph in the web browser. I got a code from JGraph and can create the graph I want, although unextendable. However, JGraph define the graph as class Gscene instead of Img or BufferedImg or RenderedImg. Therefore, I couldn't use ImageIO.write(image, ext, file) to write the graph into a jpg file.Did you read the JGraph API? I'm guessing it exposes a method to get the image data somehow. -
I am using keynote for iPad. Can somebody guide me on how to create 3d graphs ?
Can somebody guide me on how to create 3d graphs in keynote on iPad ?
SnI tried. I think 3 d charts are not available in keynote version on iPad. Is this correct ?
SN -
HT204266 how to crate apple Id with debit card.
how to crate apple Id with debit card.
iTunes Store: Accepted forms of payment
Debit cards are not an accepted form of payment, but there are other options available to you.
Maybe you are looking for
-
Nokia 6680 Standby Mode Problem
I cant change my Nokia 6680 Standby Mode. Its disapeard. When I go to Setting and then Standby Mode, I cant see Activate Standby Mode there anymore. Ive formated phone memroy but still I cant...Anybody has any information about this problem?
-
[TV@Master] hisssssssssssssssssssssssssssss
Still cant sort out why I sometimes get a hiss noise through my speakers on boot up. I have to open and close MSIPVS to make it stop.
-
How to freeze a column in numbers with ipad
Wondering how to freeze a column in numbers on the ipad. Anybody know?
-
what is the difference between business area and plant although we can treat plant as a business area
-
i have created my web page when i publish and lete i open it in the browser some pictures and graphics appears like a box with littes squeares with x insides, what is this_