2

I have a LogLogPlot and I tried @Mr.Wizard relabel function mentioned in the comment. I have two questions:

  1. It worked in the second figure but the in the first figure the x axis the minor ticks disappear.
  2. I don't want that much ticks in the Y axis in the second figure. How should I manually change the ticks using relabel function?

enter image description here

d1=(5.14148*10^9 v)/(7.00589*10^8 + 1.5758*10^16 v^2) d2=(7.69843*10^6 v)/(7.00589*10^8 + 2.86163*10^12 v^2) LogLogPlot[Evaluate@d1,{v,10^-8,1},PlotRange->{10^-6,10^-2}]//relabel LogLogPlot[Evaluate@d2,{v,10^-4,1},PlotRange->{10^-6,10^-3}]//relabel

yangyang
  • 297
  • 1
  • 7
  • 2
    You might try looking at Mark Caprio's SciDraw package for Mathematica. There is support in it for many flavours of tick marks. I just finished writing a book and did all the figures in it using SciDraw. Have a look at http://scidraw.nd.edu/. – Keith Sep 05 '16 at 15:08
  • The relabel function I provided in (5371) does this in 10.1.0, e.g. LogLogPlot[{x^2, x^3, x^4, x^5}, {x, 1, 10^4}, PlotLegends -> "Expressions"] // relabel yields http://i.stack.imgur.com/oZApI.png. Does that not work for you? – Mr.Wizard Sep 05 '16 at 15:12
  • @Keith Actually I tried this function but it bugs me is that it is not very intuitive in the sense that I need to adjust the range of x to fit this function. – yangyang Sep 05 '16 at 15:21
  • I marked this question as a duplicate in light of your comment "Ah. Great. I didn't see your solution. It worked perfect." However I see that you just deleted that comment; if you found that my solution fails please edit your question to explain in what way it fails. – Mr.Wizard Sep 05 '16 at 15:24
  • 1
    @Mr.Wizard It worked. But I need to remove some of the ticks. In my case there are 510^-6 510^-5 ... which I want to remove. Could you elaborate how to use your function to remove some of the ticks? – yangyang Sep 05 '16 at 15:26
  • @yangyang I am leaving for at least a few hours so I cannot help now. If you do not mind waiting I will be happy to reply, however you are welcome to edit your question to explain this additional need and the community will likely help you before I return. I shall reopen your question for the time being. – Mr.Wizard Sep 05 '16 at 15:30
  • @Mr.Wizard I have changed my questions based on your function. I hope someone could help. – yangyang Sep 05 '16 at 15:44
  • @Keith for the CostumTicks function I really don't understand the example presented in the pdf on page 4 about the log-log plot. If you do LogLogPlot[{[(10^x)^2,(10^x)^5},{x,0.1,1000}] , the figure is different from the one in the pdf is different. Could you tell me where I did wrong? – yangyang Sep 05 '16 at 16:47
  • Please include the code you are using to generate the two plots. The system plotting code can be quite nuanced, so there may be factors I cannot account for if I do not have the code you are actually using. – Mr.Wizard Sep 06 '16 at 14:45
  • @Mr.Wizard I added the main code for generating these two plots(red curves). Actually your code works very great except that sometimes I want to tell MMA the exact ticks I want to show via using Ticks or FrameTicks to define. In this case the minor ticks disappears. – yangyang Sep 07 '16 at 07:32

0 Answers0