1

I have created a semilogxaxis to plot my data, however I have problems showing the ticks on the x-axis the way I want. At the moment, the ticklabels are shown in the 10^n notation, however I prefer the way they are shown in the linear axis. In the linear axis they are shown as values, scaled some fixed power.

My first try was to set log ticks with fixed point and turning on scaling using scaled x ticks=true. However pgfplots fails to scale the numbers and just shows the full numbers.

Does anyone have a solution for having the for me more pleasing linear scaled xtick labels in a (semi)log axis?

My axis code:

 \begin{semilogxaxis}[
    clip mode=individual,
    xmin=2.5e5, xmax=1.45e6,
    ymin=0.021,ymax=0.033,
    enlargelimits=false,
    axis on top=true,
    xlabel=$\text{Re}_\text{i}$,
    ylabel=$\text{C}_\text{f}$,
    legend pos=south west,
    legend style={draw=none, 
                  % font=,
                  fill=none,
                 },
    legend cell align=left,
    reverse legend,
    width = 6.2cm,
    height = 5.7cm,
    ylabel near ticks, 
    log ticks with fixed point,
    scaled x ticks=true,
    % load a color `cycle list' from the `colorbrewer' library
    cycle list/Dark2-4,
    % mark list fill={.!75!white},  define fill color for the marker
    % create new `cycle list` from existing `cycle list's and an
    cycle multiindex* list={
        Dark2-4
            \nextlist
        my marks
            \nextlist
        [3 of]linestyles
            \nextlist
        very thick
            \nextlist
    }
  ]

Result with not so nice xticklabels

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.