Setpoints when using Gadfly in Julia

In my attempts to practice Julia, I made a program that draws a bifurcation diagram. My code is as follows:

function bifur(x0,y0,a=1.3,b=0.4,n=1000,m=10000) i,x,y=1,x0,y0 while i < n && abs(x) < m x,y = a - x^2 + y, b * x i += 1 end if abs(x) < m return x else return 1000 end end la = Float64[]; lx = Float64[]; for a=0:400 for j = 1:1000 x0 = rand() y0 = rand() x = bifur(x0,y0,a/100) if x != 1000 push!(la,a/100) push!(lx,x) end end end using Gadfly myplot = Gadfly.plot( x=la, y=lx , Scale.x_discrete, Scale.y_continuous, Geom.point) draw(PNG("myplot.png",10inch,8inch),myplot) 

The output I get is this image: enter image description here

To make my plot more like this: enter image description here I need to be able to set the size of the dots per pixel. Then, increasing the length of the iteration, I should get a better bifurcation diagram. Does anyone know how to set point sizes in Julia's Gadfly charts?

+6
source share
1 answer

[Just to encapsulate comments as an answer ...]

Gadfly Theme defaults are subject to change. In particular, default_point_size is probably what you are looking for.

To change the auto zoom / span settings, see Gadfly Zoom options .

+5
source

Source: https://habr.com/ru/post/974740/


All Articles