Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.7K Views
|
7 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Avoid different results while using ListPlot and DiscretePlot?

Posted 9 years ago
POSTED BY: Steven Clark
7 Replies
Anonymous User
Anonymous User
Posted 9 years ago
Attachments:
POSTED BY: Anonymous User
Posted 9 years ago

Sander: Thanks for taking the time to review and respond to my question, but I no longer need help at this time since encapsulation with $N()$ provides a satisfactory workaround for the problem. If you're interested in the general topic of prime counting functions, you might be interested in some of the results which I've illustrated on the following website.
Fourier Series Representations of Prime Counting Functions

POSTED BY: Steven Clark
POSTED BY: Sander Huisman
Posted 9 years ago

I've used this form of a Show statement which combines a Plot with a ListPlot successfully with the invocation of other simpler functions, and I suspect the complexity of the particular functions being invoked here is exposing a bug in the Mathematica implementation. The function being invoked shouldn't matter. I shouldn't get a different result when using ListPlot than I do when using DiscretePlot. I modified the Show statement with an invocation of N[] around the dOfZetaAlt2Opt function as follows and now I get the correct results, so perhaps Mathematica is getting confused while trying to keep track of too many exact results.

Show[Plot[{Im[dOfZetaAltOpt[1/2 + I x, 1/2, 10, 10]], 
   Im[Zeta'[1/2 + I x]]}, {x, 1, 25}, PlotRange -> Automatic, 
  GridLines -> Automatic, PlotPoints -> 200, MaxRecursion -> 0], 
 ListPlot[Table[{x, 
    N[Im[dOfZetaAlt2Opt[1/2 + I x, 1/2, 10, 10]]]}, {x, 1, 25}], 
  PlotStyle -> {Red}]]
POSTED BY: Steven Clark

I mean, we can't really give you much advice without knowing the functions:

Show[
 {
  DiscretePlot[Sin[x], {x, 1, 25}, PlotStyle -> {Red}],
  ListPlot[Table[{x, Sin[x]}, {x, 1, 25}], PlotStyle -> {Blue}, 
   Filling -> Axis]
  }
 ]

just works fine (V11). Always try to minimize your problem; i.e. give us only the 'core' of your code that gives a 'problem'.

POSTED BY: Sander Huisman
Posted 9 years ago
POSTED BY: Steven Clark

dOfZetaAlt2Opt ?

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