Hi,
I am using [PLplot][1] in C to generate some simple 2-d plots of time
series data and the labels for my x-axis in the resulting plot are
currently horizontal. Does anyone know how to rotate the tick labels
by 45 deg? To make it clear what I mean by rotation of tick labels,
[here][2] is an example of rotation of tick labels by 90 degrees in a
plot created using Python/MatPlotlib.
Looking through the PLPlot [documentation][3] I found reference to
[plslabelfunc][4] but I'm not sure how to use this to achieve my goal.
Best would be if someone could show how to modify this simple example
taken from the PLplot [examples][5]:
#include "plcdemos.h"
#define NSIZE 101
int
main( int argc, const char *argv[] )
{
PLFLT x[NSIZE], y[NSIZE];
PLFLT xmin = 0., xmax = 1., ymin = 0., ymax = 100.;
int i;
// Prepare data to be plotted.
for ( i = 0; i < NSIZE; i++ )
{
x[i] = (PLFLT) ( i ) / (PLFLT) ( NSIZE - 1 );
y[i] = ymax * x[i] * x[i];
}
// Parse and process command line arguments
plparseopts( &argc, argv, PL_PARSE_FULL );
// Initialize plplot
plinit();
// Create a labelled box to hold the plot.
plenv( xmin, xmax, ymin, ymax, 0, 0 );
pllab( "x", "y=100 x#u2#d", "Simple PLplot demo of a 2D line plot" );
// Plot the data that was prepared above.
plline( NSIZE, x, y );
// Close PLplot library
plend();
exit( 0 );
}
Any help would be most appreciated. I should also mention I posted
this question on stackoverflow at
http://stackoverflow.com/questions/26189242/how-do-i-rotate-tick-labels-for-an-axis-using-plplot.
[1]: http://plplot.sourceforge.net/index.php
[2]:
http://matplotlib.org/examples/ticks_and_spines/ticklabels_demo_rotation.html
[3]: http://plplot.sourceforge.net/documentation.php
[4]:
http://plplot.sourceforge.net/docbook-manual/plplot-html-5.10.0/plslabelfunc.html
[5]: http://plplot.sourceforge.net/examples.php
------------------------------------------------------------------------------
_______________________________________________
Plplot-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-general