Improving handling of very high/low values on logarithmic scales

This commit is contained in:
Adsooi 2022-01-25 23:50:01 +01:00
parent eb3b103c3e
commit 4dfba09d02
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
2 changed files with 2 additions and 2 deletions

View file

@ -37,7 +37,7 @@ Canvas {
property string yaxisstep: "4" property string yaxisstep: "4"
property string xlabel: "" property string xlabel: ""
property string ylabel: "" property string ylabel: ""
property int maxgradx: 10 property int maxgradx: 20
property double linewidth: 1 property double linewidth: 1
property double textsize: 14 property double textsize: 14
property bool logscalex: false property bool logscalex: false

View file

@ -142,7 +142,7 @@ class Function extends Common.ExecutableObject {
static drawFunction(canvas, ctx, expr, definitionDomain, destinationDomain, drawPoints = true, drawDash = true) { static drawFunction(canvas, ctx, expr, definitionDomain, destinationDomain, drawPoints = true, drawDash = true) {
// Reusable in other objects. // Reusable in other objects.
// Drawing small traits every 2px // Drawing small traits every 2px
var pxprecision = 2 var pxprecision = 0.2
var previousX = canvas.px2x(0) var previousX = canvas.px2x(0)
var previousY; var previousY;
if(definitionDomain instanceof MathLib.SpecialDomain && definitionDomain.moveSupported) { if(definitionDomain instanceof MathLib.SpecialDomain && definitionDomain.moveSupported) {