Tikz: Log ticks and minor ticks in x-axis - latex

I have a figure representing y=f(x) and I want to plot it for values of x in the range [10, 300] in log scale using tikz. If I set xmax=1e3 the ticks and minor ticks are as expected. However, when I set xmax=300 the minor ticks dissapear. In the two pictures below I show this behaviour:
\begin{axis}[
legend cell align={left},
legend entries={{Test},{Test Clip},{Train},{Train Clip}},
legend style={at={(0.03,0.97)}, anchor=north west, draw=white!80.0!black},
tick align=outside,
tick pos=left,
x grid style={white!69.01960784313725!black},
xlabel={$\dim(z)$},
xminorticks=true,
xmode=log,
xmin=10, xmax=1e3,
y grid style={white!69.01960784313725!black},
ylabel={PSNR},
ymin=15.8800682154579, ymax=26.0503182019626
]
\begin{axis}[
legend cell align={left},
legend entries={{Test},{Test Clip},{Train},{Train Clip}},
legend style={at={(0.03,0.97)}, anchor=north west, draw=white!80.0!black},
tick align=outside,
tick pos=left,
x grid style={white!69.01960784313725!black},
xlabel={$\dim(z)$},
xminorticks=true,
xmode=log,
xmin=10, xmax=300,
y grid style={white!69.01960784313725!black},
ylabel={PSNR},
ymin=15.8800682154579, ymax=26.0503182019626
]
As you can see the only thing I change is the parameter xmax.
Thank you in advance

Related

Highcharts polar chart axis labels

I have a categorical polar chart with 5 axes, and each axis has its own min/max range. I would like to configure both the axis labels and to add ticks to each individual axis.
The axis labels are drawn on the axis line itself, but I'd prefer them to be drawn slightly away from the line
There are no ticks on each axis, and I would like short ticks drawn on each axis line.
I've tried tinkering without success with the gridLine* and tick* y axis properties. Nothing seems to visually change when I do this, so I am guessing I'm barking up the wrong tree. Can I get tickmarks and better label positioning?
Here's a fiddle for this: https://jsfiddle.net/cfarmerga/cgrk96yh/
Use chart.parallelAxes.labels option to set x and y axis labels positions.
Example code:
chart: {
polar: true,
parallelCoordinates: true,
parallelAxes: {
gridLineWidth: 0,
labels: {
y: 25,
}
},
}
API Reference:
https://api.highcharts.com/highcharts/chart.parallelAxes.labels
There is no possibility to set ticks for the polar chart from the API options. You will need to draw them using Highcharts.SVGRenderer. Check the similar thread at Highcharts forum: https://www.highcharts.com/forum/viewtopic.php?f=9&t=45661
API Reference:
https://api.highcharts.com/class-reference/Highcharts.SVGRenderer

PGFPlot axis scale

i want to plot a time signal plot and i have problems with the correct tick label style:
here is my code:
\begin{axis}[
yscale=0.5,
ymin=0,
yticklabel style={scaled ticks=false,
/pgf/number format/precision=1},
\addplot[red, solid] table[x=time,y=a]{};
\end{axis}
\end{tikzpicture}
pfgplot
i tried a long time with pgf/number format/... but i didnt get any usefull help.
what i try is to get is:
comma instead points asa decimal
at the x axis there should be like 10, 20.. because i want it label with "mV"
how i can get for an logarythmic frequency plot a axis tick style like: 1k..1M..1G
Thanks for your help!

How do i show line charts (spline) with bubbles

I'd like to show something like below, i see that bubble chart supports only number/literals on XAxis but I want to plot x axis as time, Y as Number value and Z (bubble) as number.
Is it possible

How to set the tick space on x Axis when we have multiple bar charts in coreplot ios?

I have more than 4 bar charts in a coreplot graph.When the number of charts become more than 3,the charts becomes overlapping and cannot differentiate between the X axis labels.
How to increase the tick space between the x axis labels so that space always remains between the 2 x -axis labels?
The below image is when I have 3 bar charts,then the spacing looks good.
the below image is when I have more charts then there is no spacing between the ticks.
Reduce the barWidth and adjust the barOffset of each plot accordingly. This will allow more bars to fit between each label on the x-axis. You'll also need to reduce the length of the plot space xRange and/or make the graph wider to spread out the plots so the data labels don't overlap.

Highchart - Chart type, gap in the x and y axis (0,0)

Please refer the fiddle codehttp://jsfiddle.net/yuvarajkumarg/az290eyq/1/
In Highchart of type Chart, when we plot for height = 0 and pressure = 2, we get a gap as shown in jsfiddle. I want point to be plotted on the X-axis(2,0). But the graph looks like it is plotted on (2,2) since the y-axis plot starts way above the x-axis. How to remove the gap ?
The issue is the categorized axis.
There are probably a few ways around the issue, but I would do it this way (on your xAxis):
tickmarkPlacement: 'on',
min:0.5,
max:6.5
Example:
http://jsfiddle.net/az290eyq/2/
You could also do it by not using categories, and using the axis label formatter in order to display the numeric sequence that you need.
[[ edit for comments:
For the min and max values - the x axis values for a categorized axis are the category array index values. So the first category is x = 0, the second is x = 1, etc.
Because Highcharts puts the the label in the center of the value's space, setting the min/max to the actual min/max value +/- 0.5 will align the center of the space with the start/end of the axis.
So, you can calculate this dynamically by using 0.5 for the min, and counting the categories array and using (count -1.5) as the max.
Additionally, setting the tickmarkPlacement proerty to 'on' moves the tick mark to the center of the space as well, aligning the ticks with the start/end of the axis as well.

Resources