You are a guest. Restricted access. Read more.
SCaVis manual

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
man:visual:plots2d [2013/08/10 22:25]
127.0.0.1 external edit
man:visual:plots2d [2014/09/21 19:21] (current)
admin
Line 52: Line 52:
 the image to vector format. the image to vector format.
 Now you are ready to plot functions, histograms and datasets. Now you are ready to plot functions, histograms and datasets.
-See documentation of HPlot in  ​[[/​scavis/​api/​doc.php/​jhplot/​HPlot|HPlot]]. +See the  ​[[/​scavis/​api/​doc.php/​jhplot/​HPlot|HPlot ​documentation]]. 
-It should be noted the HPlot canvas can be replaced by any other canvas described above.+It should be noted the [[/​scavis/​api/​doc.php/​jhplot/​HPlot|HPlot]] ​canvas can be replaced by any other canvas described above.
  
  
Line 129: Line 129:
 We labeled a point and generated a PDF files with the figure as shown in this figure: We labeled a point and generated a PDF files with the figure as shown in this figure:
  
-{{ticks.png|}}+{{ticks.png| ​Ticks on axis}}
  
 +=====Showing shapes and objects=====
  
 +You can show data and functions together with different 2D objects.
 +Here is a simple example that shows a histogram, a data set in X-Y and 3 ellipses:
 +
 +{{:​man:​visual:​p1d_shapes.png| Shapes and data}}
 +
 +<ifauth !@member>​
 +<note important>​
 +Unregistered users have a limited access to this section.
 +You can unlock advanced pages after  becoming [[/​scavis/​members/​selock| a full member]]. ​
 +You can also request to edit this manual and insert comments. ​
 +</​note>​
 +</​ifauth>​
 +<ifauth @member,​@admin,​@editor>​
 +
 +<code python 1|t p1d_shapes.py >
 +extern> p1d_shapes.py
 +</​code>​
 +
 +</​ifauth>​
 +
 +
 +Look at the Section [[man:​visual:​shapes | Drawing shapes]].
 ======Post editing====== ======Post editing======
  
Line 171: Line 194:
  
  
-====== Showing real-time data ====== 
-{{tag>​real_time data_stream}} 
- 
-All canvas can be used to show data updated in real time. As example, we show how to display a random 
-points, updating the data every 100 ms. Note that we use the method "​clearData()",​ which reloads data container but does not change its graphical attributes. A slower method is "​clearAll()"​ 
-which reloads graphical attributes of the canvas. 
- 
-<code python 1|t canvas_hplot_realtime.py>​ 
-extern> canvas_hplot_realtime.py 
-</​code>​ 
- 
- 
-<note tip>The method "​clearData()"​ 
-may produce some memory leak if labels for X or  Y are should be drawn. It is advised to call "​clearLabels()"​ method, in addition to "​clearData()"​ to avoid a memory leak related to the font creation/​destruction of labels. ​ 
-Read this  [[/​scavis/​forum/​viewtopic.php?​id=10 | this forum ]] for details.</​note>​ 
- 
- 
-You can also use a lighter canvas, "​SPlot",​ which is much simpler and requires less resources. 
  
  
Line 247: Line 252:
  
  
-====== Embedding ​canvases into external ​JFrame ======+====== Embedding ​in JFrame ====== 
 + 
 +It is possible to embed SCaVis canvases in Java <​javadoc>​java.swing.JFrame</​javadoc>,​ so you can build an application with custom buttons. 
 +Here is an example:
  
 <ifauth !@member>​ <ifauth !@member>​
Line 257: Line 265:
 <ifauth @member,​@admin,​@editor>​ <ifauth @member,​@admin,​@editor>​
  
-It is possible to embed canvases to JFrame of the HPlot object. 
  
 <code python> <code python>
Line 274: Line 281:
  
  
 +====== Density plots ======
 +
 +You can also make density plots in which color represent density (or values).
 +Look at this rather comprehensive example which shows how to plot F2D functions or 2D histograms (H2D) using several pads:
 + 
 +<code python 1|t canvas2D_contour.py>​
 +extern> canvas2D_contour.py
 +</​code>​
 +
 +{{:​man:​visual:​screenshot_from_2013-08-15_22_34_52.png}}
 +
 +
 +====== ​ Using Waterloo scientific charts ======
 +
 +SCaVis allows to access rather ​ reach Waterloo scientific graphics as shown in this Python example:
 +
 +<ifauth !@member>​
 +<note important>​
 +Unregistered users have a limited access to this section.
 +You can unlock advanced pages after  becoming [[/​scavis/​members/​selock| a full member]]. ​
 +You can also request to edit this manual and insert comments. ​
 +</​note>​
 +</​ifauth>​
 +<ifauth @member,​@admin,​@editor>​
 +
 +<code python 1|t canvas2D_waterloo.py >
 +extern> canvas2D_waterloo.py
 +</​code>​
 +
 +</​ifauth>​
 +
 +This plot shows the function x*x as shown below:
 +
 +{{:​man:​visual:​waterloo_2d.png}}
 ====== Other charts ====== ====== Other charts ======
  
man/visual/plots2d.txt · Last modified: 2014/09/21 19:21 by admin
CC Attribution-Share Alike 3.0 Unported
Powered by PHP Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 Valid HTML5