secax = ax.secondary_xaxis ('top', functions = (step2theta, theta2step)) secax.set_xlabel ('theta [deg]')
I created an x-axis with a different value at the top of the graph, but I don't know how to set the range for that axis.
If it is the default x-axis
plt.xticks (np.arange (0, 1, 0.01))
You can set the range by setting the range like this, but is it possible to specify the range in the graph created by ax.secondary_xaxis like this?
I would appreciate it if you could answer.
Answer # 1
For example if we want to have a second scale for the data plotted on the xaxis.
This function, unlike the second axis that you often see (the axis that divides the scale for easier viewing in a plot with multiple data), I feel that it is an axis that looks at one data from another perspective. (Mutually convertible, such as frequency and seconds)
Since the 1st axis is converted to create the 2nd axis, it seems that the scale of the 1st axis inevitably works on the 2nd axis as it is.
I saw it for the first time, so I'm sorry if I made a mistake.Postscript
What is this alone ...
Isn't the function you are looking for something like the one below? (This is the vertical axis)
How to write a Matplotlib-2 axis graph
[Python] How to draw a graph with two axes on the left and right with matplotlib
- what did you do when the setting file path is newly created because it is a program created in c#?
- setting range with slices in python pandas
- python - how to get the coordinates of a graph created with matplotlib
- java - histogram range setting
- python - how to set colorbar range with matplotlib
- matplotlib - does the model created by supervised learning model (svm) differ even if the training is performed using the same t
- Axis range of Python matplotlib study notes
- Python matplotlib axis setting method
- Android implementation of dynamic setting range control
- flask - i want to display the graph created with matplotlib with vuejs
- python - i want to display a graph of matplotlib on tkinter and enable mouse operation in canvas
- python - i want to find the average hsv value for each divided image
- python - background program by sharley method
- python - i want to find the intersection of the lines of the least squares method when the button is pressed
- python : How to set aside the formula in text format?
- matplotlib - i want to find the coordinates from a masked image and output it to a graph
- python - pass the calculation defined by the function for all combinations of arrays
- python - image is not displayed with skimageioshow ()
- how to get a moving average of data by python file