Title Size, Font setting problems

27 views
Skip to first unread message

Milind Gupta

unread,
Nov 3, 2023, 8:44:24 PM11/3/23
to mat...@googlegroups.com
Hi,
     I am plotting a simple curve with the following code in Lua:

gr = mathgl.mglGraph()
x = mathgl.mglData(200)
y = mathgl.mglData(200)

xv = -1
for i = 0,200 do
    print(xv,xv^2)
    x:SetVal(xv,i)
    y:SetVal(xv^2,i)
    xv = xv + 0.01
end

gr:SetFontSize(3.0)
gr:SetRanges(-1,1,-0.1,1)
gr:SetOrigin(0,0,0)
gr:Axis()
gr:Plot(x,y,"r2-")
gr:Title("Simple Quadratic y=x^2","",3)

This is what I get:
image.png
The title as it grows smaller it just moves up and is now touching the top edge of the plot. How can I make the title still be close to the plot area?

Also how can I load like a Arial font and write everything in it?

Thanks,
Milind

Milind Gupta

unread,
Nov 4, 2023, 11:16:53 PM11/4/23
to mat...@googlegroups.com
I see that the display of the Axis is not very sharp. Some places it is black some places it is gray. Am I missing something? How can I make the image sharper?

Thanks,
Milind
Reply all
Reply to author
Forward
0 new messages