0
$\begingroup$

I do fit a function from a dataset which I need to display in a LogLogPlot in order to make it display as linear. I do also need to overlay an LogLogErrorBarPlot so they show together in one graphic - which fails. I feel like something is wrong about the LogLogPlot of my fitted model but can't really tell what it is other that said LogLogPlot looks sketchy (note the y-dimensions...). What I've done so far:

Needs["ErrorBarLogPlots`"]
...
Cdata = Import[
filepath, {"Data", 1, Range[2, 9], {1, 4, 5, 8, 9}}]
Cdata[[All, 1]] 
{2000., 3123., 4824., 6989., 9049., 11050., 12950., 14640.}
fitList = Transpose[{Cdata[[All, 1]], Zcres[[All, 1]]}];
fitC = NonlinearModelFit[fitList[[All, {1, 2}]], 
  a/(f), {{a, 2*Pi*107*10^(-9)}}, {f}, Weights -> 1/uZc^2]
fitCn = Normal[fitC];
plotList = Transpose[{Cdata[[All, 1]], Zcres[[All, 1]]}]
{{2000., 778.53}, {3123., 478.889}, {4824., 297.143}, {6989., 
204.286}, {9049., 152.698}, {11050., 125.135}, {12950., 
106.418}, {14640., 92.7027}}
formattedData = Thread[{fitList, ErrorBar /@ uZc}]
{{{2000., 778.53}, ErrorBar[0.0000923914]}, {{3123., 478.889}, 
ErrorBar[0.000156972]}, {{4824., 297.143}, 
ErrorBar[0.000238414]}, {{6989., 204.286}, 
ErrorBar[0.000371446]}, {{9049., 152.698}, 
ErrorBar[0.000485536]}, {{11050., 125.135}, 
ErrorBar[0.000590405]}, {{12950., 106.418}, 
ErrorBar[0.00080528]}, {{14640., 92.7027}, ErrorBar[0.0009158]}}
errloglogPlot =  
 ErrorListLogLogPlot[formattedData, PlotStyle -> Red, 
  PlotRange -> {{1900, 14000}, {0, 700}}]
fitloglogPlot = LogLogPlot[fitCn, {f, 1900, 14000}]
Show[fitloglogPlot, errloglogPlot, 
 PlotRange -> {{1900, 1400}, {0, 750}}]

In the output of "Show[fitloglogPlot, errloglogPlot,...] it just displays my fitloglogPlot... ![output]: (https://imgur.com/a/xBBYu) The upper plot is the errorLogLogPlot which displays just fine, so does a normal Plot of the fit. Bottom ist genereted from "Show..." Id been looking through the documentation but couldn't find anything.

Regards

$\endgroup$
  • $\begingroup$ What is the version of Mathematica? And after entering Needs["ErrorBarLogPlots"]` do you get $Failed ? $\endgroup$ – JimB Jan 26 '18 at 23:59
  • $\begingroup$ OK, I found ErrorBarLogPlots on MathSource. But what the heck is Cdata. Without all the information, we can't help. $\endgroup$ – Bill Watts Jan 27 '18 at 8:28
  • $\begingroup$ Cdata is just an Import from an Excel-Sheet, I'll update. $\endgroup$ – Zi1mann Jan 27 '18 at 9:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.