Message Boards Message Boards

0
|
1603 Views
|
4 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Unexpected discontinuity in a plot

Posted 11 months ago

I wrote some codes but the plot is not continuous.

How to fix the problem?

POSTED BY: Reza Hamzeh
4 Replies

What is the meaning of Dashing[Block]? What is the 12 in Directive[Black, 12]? Did you mean to specify the Thickness? That's not the way to do it. Your function l[r] behaves very differently with exact rational values of r and with floating-point values. Compare the time it takes for l[.5] and for l[1/2]. Why do you resort to ListLinePlot with rational values of r and not just do this:

Plot[l[r], {r, .01, .8}, PlotStyle -> Black, PlotRange -> {0, 0.5}, 
 Frame -> True, RotateLabel -> False, 
 FrameStyle -> Directive[Black, Thickness[.004]], 
 FrameLabel -> {Style["r", 13, Bold, Black], 
   Style["N", 13, Bold, Black]}, 
 PlotLabel -> Style["b", 13, Bold, Black]]
POSTED BY: Gianluca Gorni
Posted 11 months ago

What version are you running? Under version 13.2 your plot is continuous and looks fine.

You do notice that you have PlotStyle->{Dashing[Block],Black} Do you really want a dashed plot when you are asking why you are seeing gaps in your plot, but I don't think that is your issue?

What happens if you include PlotPoints->100 or PlotPoints->250 to increase the number of sampling points? Pushing that up too much will slow it down, but may improve the quality.

POSTED BY: Bill Nelson
Posted 11 months ago

i doesn't solve the problem.

POSTED BY: Reza Hamzeh
Posted 11 months ago
l[r_]:=Tr[MatrixPower[N[p[r].p[r]],1/2]]-1;
Plot[l[r],{r,0,0.2}]
t=Table[{r,l[r]},{r,1/100,80/100,1/100}]
ListLinePlot[t]

enter image description here

POSTED BY: Bill Nelson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract