Height of the embedded visualization in the Width of the embedded visualization in the Scaling factor for matrix row labels fontĪ filename for generating an HTML-file to embed If TRUE, the data is automatically scaled If FALSE, the coordinate axes are hidden in In vertical instead of horizontal orientation Of the plot origin (can be used to translate the plot)Ī scaling factor for the size of the entire Input matrix (the cols- and rcols-parameter can remainĪ vector of length 3 specifying the coordinates Specifies the bar colors per column of the The number of colors must correspond to the Input matrix (the cols- and ccols paramter can remain One or at least as large as the number of different labels Space between single bars in a bar plot (as aĪ vector of colors to visualize different classesĪmong the data points. Set automatically if mesh3d is called after vrml.open() or The output type ("vrml" or "lg3d"), this will be Hovering the mouse over a data point in the plot (in VRML) Optional metalabels for the rows which can be accessed by See the code below.Bar3d ( data, row.labels = rownames ( data ), col.labels = colnames ( data ), metalabels = NULL, filename = "out.wrl", type = "vrml", space = 0.5, cols = rainbow ( length ( as.matrix ( data ))), rcols = NULL, ccols = NULL, origin = c ( 0, 0, 0 ), scalefac = 4, lab.axis = c ( "X-axis", "Y-axis", "Z-axis" ), lab.vertical = FALSE, col.axis = "black", showaxis = TRUE, autoscale = TRUE, ignore_zeros = TRUE, col.lab = "black", col.bg = "white", cex.lab = 1, cex.rowlab = 1, cex.collab = 1, htmlout = NULL, hwidth = 1200, hheight = 800, showlegend = TRUE, vrml_navigation = "EXAMINE", vrml_transparency = 0, vrml_fov = 0.785, vrml_pos = rep ( scalefac + 4, 3 ), vrml_dir = c ( 0.19, 0.45, 0.87, 2.45 ), lg3d_ambientlight = 0.5 )Ī numerical matrix with 3 columns and n rowsĪ vector of strings or numbers containing Each bar is multicolored, with colors corresponding to distinct elements and showing each row element’s relative contribution to the total sum.įor example, let’s change some properties and the style of the above graph. The height of the bar is the sum of the elements in each row of the given matrix. The stacked style displays one bar for each row in the given matrix. Each group contains one bar column-wise in the given matrix. The grouped style displays x groups of y vertical bars, where x is the number of rows and y is the number of columns in the given matrix. The detached style displays the elements of each row in the given matrix as separate blocks behind one another in the x-axis direction. We can also set the style of the graph like grouped style, detached style, and stacked style. We can also change some properties of the bar graph like the bar width by defining the width as a second argument, the color of the bar using the name of the color as a second or third argument, and the axis of the graph instead of the current axes by defining the axes as the first argument in the bar3() function. If the matrix has only one row, the color of all the bars will be the same. The color will change in columns and will remain the same in rows. In the output, the bar3() function will automatically change the color of each bar depending on the indices of the matrix.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |