lobidynamics.blogg.se

Veusz plotting
Veusz plotting










veusz plotting

One solution that can work well is to make each of the dots a bit transparent-that way, it is more apparent when dots overlay one another.Ī downside of this approach is that figures with transparency can cause problems when exporting to PDF, so a bitmap-based approach is required. val = float ( + axis_extreme ) curr_axis. val = float ( - axis_extreme ) curr_axis. val = True typeface = "Arial" for curr_axis in : curr_axis. val = 1.0 axis_pad = 0.5 axis_extreme = np. Add ( "graph", autoadd = False ) x_axis = graph. multivariate_normal ( mean =, cov = cov, size = n ) embed = veusz. Import numpy as np import veusz.embed n = 200 true_corr = - 0.5 # don't worry too much about this - just a way to generate random numbers with # the desired correlation cov =, ] data = np. Let’s increase the number of participants to make the problem more apparent:

veusz plotting

Now the figure is looking pretty good, but a final potential issue is that it is hard to see whether some of the dots overlap with one another. Import numpy as np import veusz.embed n = 30 true_corr = - 0.5 # don't worry too much about this - just a way to generate random numbers with # the desired correlation cov =, ] data = np. The ordering of participants is not relevant to the current analysis, so let’s turn them off: One problematic aspect of the current figure is that successive participants have their data points joined by a line. We also set the axes to be symmetric about zero and the same for x and y. We also set a graph property that we haven’t come across before, aspect, to 1.0-this makes the graph equally wide and tall, which is useful for scatter plots. Ok, we have made a bit of progress-but before it can start to look like a good scatter plot, let’s first apply the formatting changes that we typically do.












Veusz plotting