<jupyter_start><jupyter_text>Miscellaneous Properties<jupyter_code>y_sc = LinearScale()

ax_x = Axis(label='Test X', scale=y_sc, grid_lines='solid')
ax_y = Axis(label='Test Y', scale=y_sc, orientation='vertical', tick_format='0.2f', grid_lines='solid')

line = Lines(x=y_data_2, y=y_data_2,
             scales={'x': y_sc, 'y': y_sc}, colors=['hotpink', 'orange'])

m_fig = dict(left=100, top=50, bottom=50, right=100)
fig = Figure(axes=[ax_x, ax_y], marks=[line], fig_margin=m_fig)
fig
# Displaying Grid Lines for the axis
ax_x.grid_lines = 'solid'
ax_y.grid_lines = 'dashed'
# Changing the side of the axis
ax_y.side = "right"
ax_x.side = "top"
ax_y.orientation = "horizontal"
ax_x.orientation = "vertical"
## Changing the format of the ticks on the axis
fig.axes[0].tick_format = "0.2f"
fig.axes[1].tick_format = "0.0f"
## Changing the color of the axis
with ax_x.hold_sync():
    ax_x.color = 'orangered'
    ax_x.label_color = 'orangered'
#change the grid colors
ax_x.grid_color = 'red'<jupyter_output><empty_output><jupyter_text>Label Placement<jupyter_code>x_sc = LinearScale()
y_sc = LinearScale()

ax_x = Axis(label='Test X', scale=x_sc)
ax_y = Axis(label='Test Y', scale=y_sc, orientation='vertical', tick_format='0.3f')

line = Lines(x=x_data, y=y_data_2, scales={'x': x_sc, 'y': y_sc}, colors=['hotpink', 'orange'])

m_fig = dict(left=100, top=50, bottom=50, right=100)
Figure(axes=[ax_x, ax_y], marks=[line], fig_margin=m_fig)
## moving the label along the axis
ax_x.label_location = 'end'
ax_y.label_location = 'start'
## moving the label perpendicular to the axis
ax_y.label_offset = '6ex'
ax_x.label_offset = '-1em'<jupyter_output><empty_output><jupyter_text>Ticks properties<jupyter_code>x_sc = LinearScale()
y_sc = LinearScale()

ax_x = Axis(label='index', scale=x_sc)
ax_y = Axis(label='Brownian', scale=y_sc, orientation='vertical', tick_format='0.2f')

line = Lines(x=x_data[:20], y=y_data[:20], scales={'x': x_sc, 'y': y_sc}, colors=['hotpink', 'orange'])

m_fig = dict(left=50, top=50, bottom=50, right=50)
Figure(axes=[ax_x, ax_y], marks=[line], fig_margin=m_fig)
# Setting the number of ticks
ax_x.num_ticks = 8
# Setting the tick values
ax_x.tick_values = np.arange(1, 21)<jupyter_output><empty_output><jupyter_text>Axis Placement<jupyter_code>sc_x = LinearScale()
sc_y = LinearScale(reverse=True)
sc_y2 = LinearScale()

sc1 = Scatter(x=x_data[:10], y=y_data[:10],
              scales={'x': sc_x, 'y': sc_y},
              labels=['Test 1'],
              default_size=100, display_legend=True)

sc2 = Scatter(x=x_data[:10], y=y_data_2[:10],
              colors=['dodgerblue'],
              marker='cross', labels=['Test 2'],
              scales={'x': sc_x, 'y': sc_y2}, display_legend=True)<jupyter_output><empty_output><jupyter_text>Placement of axis in terms of figure scales<jupyter_code>## Setting offset for axis in terms of figure scales
ax_x = Axis(label='Test X', scale=sc_x, 
            grid_lines='solid', offset=dict(value=0.2), label_location="start")

ax_y = Axis(label='Test Y', scale=sc_y, 
            orientation='vertical', tick_format='0.2f', grid_lines='solid', label_location="end")

ax_y2 = Axis(label='Test Y2', scale=sc_y2, orientation='vertical', side='right', 
             tick_format='0.2f')
Figure(axes=[ax_x, ax_y, ax_y2], marks=[sc1, sc2], legend_location='top-right',
       padding_x=0.025)
# restoring to default position
ax_x.offset = {}<jupyter_output><empty_output><jupyter_text>Placement of axis in terms of actual scales and data<jupyter_code>ax_y.offset = dict(value=3.0, scale=sc_x)<jupyter_output><empty_output><jupyter_text>Color Axis<jupyter_code>x_sc = LinearScale()
y_sc = LinearScale()
col_sc = ColorScale()

scatter = Scatter(x=x_data, y=y_data, color=y_data_2,
                  scales={'x': x_sc, 'y':y_sc, 'color': col_sc})
ax_x = Axis(scale=x_sc)
ax_y = Axis(scale=y_sc, orientation='vertical', tick_format='0.2f')
ax_c = ColorAxis(scale=col_sc, label='Color')

margin=dict(top=80, left=80, right=80, bottom=80)
Figure(marks=[scatter], axes=[ax_x, ax_y, ax_c], fig_margin=margin)<jupyter_output><empty_output><jupyter_text>Changing side and orientation of color axis<jupyter_code>ax_c.side = 'top'
with ax_c.hold_sync():
    ax_c.orientation = 'vertical'
    ax_c.side = 'right'
ax_y.side = 'right'
ax_c.side = 'left'<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1616254906488109, 'fraction_numerical': 0.023089355806972984, 'mean_word_length': 5.887122416534181, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '72772', 'license': 'Apache-2.0', 'n_tokens_mistral': 1771, 'n_tokens_neox': 1688, 'n_words': 328, 'path': 'examples/Advanced Plotting/Axis Properties.ipynb', 'repo_name': 'maartenbreddels/bqplot', 'size': '4331'}