[LON-CAPA-users] Logscale in Lon-Capa Gnuplot

Gerd Kortemeyer korte at lite.msu.edu
Tue Aug 13 05:30:34 EDT 2013


Hi Mark,

On Aug 13, 2013, at 4:50 AM, Mark Kettner <mkettn at technik-emden.de> wrote:

> the plot-image breaks if I add that argument.
> 
> I think I need arguments for the base and the axis which should be
> displayed logarithmic too.
> 
> my code is:
> 
> <gnuplot width="400" height="400" grid="on" gridtype="Log-Linear">
> 	<axis xmin="-5" xmax="5" ymin="-5" ymax="5" color="xB6B6B6" />
> 	<xtics start="-5" end="5" />
> 	<ytics start="-5" end="5" />
> 	<xlabel>x</xlabel>
> 	<ylabel>y</ylabel>
> 	<curve>
> 		<function>exp(x)</function>
> 	</curve>
> </gnuplot>

That's just a mathematical problem with a negative logarithm: you need to start the y-axis at a positive value. The code

<problem>
<gnuplot width="400" height="400" grid="on" gridtype="Log-Linear">
	<axis xmin="-5" xmax="5" ymin="0.1" ymax="100" color="xB6B6B6" />
	<xtics start="-5" end="5" />
	<xlabel>x</xlabel>
	<ylabel>y</ylabel>
	<curve>
		<function>exp(x)</function>
	</curve>
</gnuplot>
</problem>

gives the expected result.

- Gerd.


More information about the LON-CAPA-users mailing list