Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plot line disappears if any element is set too large #1

Open
williamjsdavis opened this issue Apr 9, 2020 · 0 comments
Open

Plot line disappears if any element is set too large #1

williamjsdavis opened this issue Apr 9, 2020 · 0 comments

Comments

@williamjsdavis
Copy link
Owner

If any ordinate element in a plot array is either initially set (or modified to) a value that is too large, the plot line vanishes.

To reproduce the bug:

using Plots, SmoothLivePlot

function myPlotFun(yVals)
   plot(0:0.1:1, 0:0.1:1)
   plot!(range(0,1,length=length(yVals)), yVals)
   ylims!(0,2)
end

inyVals = collect(0.2:0.01:0.3)

outPltOb = @makeLivePlot myPlotFun(inyVals)

Screen Shot 2020-04-09 at 12 38 30

Modifying an ordinate element of the plot object to modest values produces no error:

newYvals = copy(inyVals)
newYvals[5] = 10

modifyPlotObject!(outPltOb, arg1 = newYvals)

Screen Shot 2020-04-09 at 12 38 49

However, modifying to large values makes the line disappear

newYvals[5] = 1e8

modifyPlotObject!(outPltOb, arg1 = newYvals)

Screen Shot 2020-04-09 at 12 38 58

"Large" ordinate values that cause the bug seem to be >1e8. Interestingly, this bug does not occur for large negative numbers. This bug does not occur with scatter. Large abscissa have not been tested yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant