Written by: STATISTICA 3/28/2011 8:31 AM
Occasionally in working with graphs in STATISTICA, you may encounter a graph that cannot be drawn. This can be due to a number of possibilities. This article will discuss potential causes of graph rendering issues and solutions to those issues. Potential Causes of Graph Rendering Issues and Solutions Issue - Long Variable Names. Many graphs use the variable names to label an axis. The length of the variable name may take up too much space, leaving insufficient space for the plot area. This will result in the Cannot draw graph message as shown in the image above. For example, the data set shown in the next image records responses to questions about individual dining experiences. The variable names are the survey questions asked, and are quite long. A multiple bar plot created from this data would use those variable names in the legend of the graph, potentially not leaving enough space for the plot itself. In this case, the graph would not render and would display the message Cannot draw graph. Solution 1 - Shorter Variable Names. A solution for this type of problem is to create shorter, more manageable variable names. On the Data tab in the Variables group, click All specs to display the Variable Specifications Editor. In this dialog, aspects of all variables in the spreadsheet can be accessed at once. Copy the Name column and paste it to the Long Name (label or formula) column to retain this information. Now create short, manageable names for the variables. Variable selection dialogs and output will use the short names. You can show the long names or short names in the input spreadsheet via the View tab, Display group, Variable Headers option. The graph in the next image shows the plot with the abbreviated variable names, leaving more space for the bar plot. If the variable names were not abbreviated, the graph would not render. Solution 2 - Change Graph Dimensions. Since the graph legend is plotted to the side, a wider graph would create more space for legend and plot. Use the graph customization options to change graph dimensions. With the graph active, select the Edit tab. In the Options group, click Graphs to display the Graph Options dialog. In the tree view, select Window (located under Graph) to access Size options of Width and Height. Changing these settings may enable your graph to draw. In the current example, the width needs increased to produce more room for the plot and legend. Issue - Long Category Names. Some plots use the category names of a nominal variable in labeling a plot axis. This is the case with the bivariate histogram shown in the next image. The categories in this example are a description of education for one variable and a description of living situation for the other. The length of the category names take up substantial space in the graph area. If these category names were much longer, the graph may not be able to draw. Solution - Abbreviate category names. If category names are suspect, they should be abbreviated. In order not to lose information in the spreadsheet, it may be beneficial to create new variables for the abbreviated versions of the categories. On the Data tab in the Variables group, click Variables. From the drop-down menu, select Add. In the resulting Add Variables dialog, choose how many variables and the location to add. Since 2 variables for the plot have long category names, 2 variables were added. Then, on the Data tab in the Transformations group, click Recode to display the Recode Values of Variable dialog. Enter expressions for the existing long category names and a new abbreviated value for each. When the two variables are recoded, use the new abbreviated variables to create the plot. Much more space is allocated to the plot in this graph. Issue - Too Many Plots in Compound Graphs. STATISTICA creates compound graphs such as matrix plots as seen in the next image and categorized plots. Another option is to create custom compound graphs with your own plots. If the number of plots is too large, the graph will not be able to draw. As can be seen in the example below, a large number of graphs will display in one plot. But at some point, not enough room exists to create the plot. Solution - Simplify Graph. The best solution in this case is to simplify the graph to exhibit fewer plots. For a matrix plot, the variables can be split into multiple plots to enable graph rendering and to be better able to see the plots within the graph. Conclusion. The cause of a graph’s rendering issues may not be apparent right away. Trying a few different things may help you to understand why it won’t plot. Understanding is the first step to a solution.
0 comment(s) so far...